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.8 KiB
1 line
7.8 KiB
{"version":3,"sources":["webpack:///./node_modules/matrix-react-sdk/src/async-components/views/dialogs/security/ExportE2eKeysDialog.tsx","webpack:///./node_modules/matrix-react-sdk/src/utils/MegolmExportEncryption.ts"],"names":["Phase","ExportE2eKeysDialog","React","Component","constructor","props","super","ev","preventDefault","passphrase","this","state","passphrase1","passphrase2","setState","errStr","_t","startExport","onFinished","phrase","target","value","phase","Edit","componentWillUnmount","unmounted","Promise","resolve","then","matrixClient","exportRoomKeys","k","MegolmExportEncryption","JSON","stringify","f","blob","Blob","type","FileSaver","saveAs","catch","e","logger","error","msg","friendlyText","Exporting","render","disableForm","className","title","onSubmit","onPassphraseFormSubmit","label","onChange","onPassphraseChange","autoFocus","size","disabled","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","length","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":"8IA6BKA,E,iGAAK,SAALA,KAAK,YAALA,EAAK,uBAALA,MAAK,KAkBK,MAAMC,UAA4BC,IAAMC,UAG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