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
7.9 KiB
1 line
7.9 KiB
{"version":3,"sources":["webpack:///./node_modules/matrix-react-sdk/src/async-components/views/dialogs/security/ImportE2eKeysDialog.js","webpack:///./node_modules/matrix-react-sdk/src/utils/MegolmExportEncryption.js"],"names":["ImportE2eKeysDialog","React","Component","constructor","props","super","ev","files","this","_file","current","setState","enableSubmit","_passphrase","value","length","preventDefault","_startImport","onFinished","_unmounted","createRef","state","phase","errStr","componentWillUnmount","file","passphrase","Promise","resolve","reject","reader","FileReader","onload","e","target","result","onerror","readAsArrayBuffer","readFileAsArrayBuffer","then","arrayBuffer","MegolmExportEncryption","keys","matrixClient","importRoomKeys","JSON","parse","catch","console","error","msg","friendlyText","_t","render","BaseDialog","sdk","disableForm","className","title","onSubmit","_onFormSubmit","htmlFor","ref","id","type","autoFocus","onChange","_onFormChange","disabled","size","onClick","_onCancelClick","PropTypes","instanceOf","MatrixClient","isRequired","func","subtleCrypto","window","crypto","subtle","webkitSubtle","friendlyError","Error","cryptoFailMsg","async","decryptMegolmKeyFile","data","password","body","fileStr","TextDecoder","decode","Uint8Array","lineStart","lineEnd","indexOf","line","slice","trim","HEADER_LINE","dataStart","undefined","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","nLines","Math","ceil","lines","Array","o","encodeBase64","join","buffer","packMegolmKeyFile","start","Date","key","keybits","importKey","deriveBits","hash","now","log","aesProm","hmacProm","all","String","fromCharCode","apply","btoa"],"mappings":"oOAuCe,MAAMA,UAA4BC,IAAMC,UAMnDC,YAA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