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

{"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,UAG5CC,YAAYC,GACf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