You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
8.0 KiB
1 line
8.0 KiB
{"version":3,"sources":["webpack:///./node_modules/matrix-react-sdk/src/async-components/views/dialogs/security/ImportE2eKeysDialog.tsx","webpack:///./node_modules/matrix-react-sdk/src/utils/MegolmExportEncryption.ts"],"names":["Phase","ImportE2eKeysDialog","React","Component","constructor","props","super","createRef","files","this","file","current","setState","enableSubmit","state","passphrase","length","ev","target","value","onFormChange","preventDefault","startImport","onFinished","phase","Edit","errStr","componentWillUnmount","unmounted","Importing","Promise","resolve","reject","reader","FileReader","onload","e","result","onerror","readAsArrayBuffer","readFileAsArrayBuffer","then","arrayBuffer","MegolmExportEncryption","keys","matrixClient","importRoomKeys","JSON","parse","catch","logger","error","msg","friendlyText","_t","render","disableForm","className","title","onSubmit","onFormSubmit","htmlFor","ref","id","type","autoFocus","onChange","disabled","label","onPassphraseChange","size","onClick","onCancelClick","subtleCrypto","window","crypto","subtle","webkitSubtle","friendlyError","message","cryptoFailMsg","async","decryptMegolmKeyFile","data","password","body","fileStr","TextDecoder","decode","Uint8Array","lineStart","lineEnd","indexOf","Error","line","slice","trim","HEADER_LINE","dataStart","undefined","TRAILER_LINE","dataEnd","base64","latin1String","atob","uint8Array","i","charCodeAt","decodeBase64","unpackMegolmKeyFile","brand","SdkConfig","get","ciphertextLength","salt","subarray","iv","iterations","ciphertext","hmac","aesKey","hmacKey","deriveKeys","toVerify","isValid","plaintext","verify","name","decrypt","counter","encryptMegolmKeyFile","options","kdfRounds","kdf_rounds","getRandomValues","encodedData","TextEncoder","encode","encrypt","cipherArray","bodyLength","resultBuffer","idx","set","toSign","sign","hmacArray","LINE_LENGTH","nLines","Math","ceil","lines","Array","o","encodeBase64","join","buffer","packMegolmKeyFile","start","Date","key","keybits","importKey","deriveBits","hash","now","log","getTime","aesProm","hmacProm","all","String","fromCharCode","apply","from","btoa"],"mappings":"+IAuCKA,E,+EAAK,SAALA,KAAK,YAALA,E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