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/ImportE2eKeysDialog.js","webpack:///./node_modules/matrix-react-sdk/src/utils/MegolmExportEncryption.js"],"names":["createReactClass","displayName","propTypes","matrixClient","PropTypes","instanceOf","MatrixClient","isRequired","onFinished","func","getInitialState","enableSubmit","phase","errStr","UNSAFE_componentWillMount","this","_unmounted","_file","createRef","_passphrase","componentWillUnmount","_onFormChange","ev","files","current","setState","value","length","_onFormSubmit","preventDefault","_startImport","file","passphrase","Promise","resolve","reject","reader","FileReader","onload","e","target","result","onerror","readAsArrayBuffer","readFileAsArrayBuffer","then","arrayBuffer","MegolmExportEncryption","keys","props","importRoomKeys","JSON","parse","catch","console","error","msg","friendlyText","_t","_onCancelClick","render","BaseDialog","sdk","disableForm","state","className","title","onSubmit","htmlFor","ref","id","type","autoFocus","onChange","disabled","size","onClick","TextEncoder","window","TextEncodingUtf8","TextDecoder","subtleCrypto","crypto","subtle","webkitSubtle","friendlyError","Error","cryptoFailMsg","async","decryptMegolmKeyFile","data","password","body","fileStr","decode","Uint8Array","lineStart","lineEnd","indexOf","line","slice","trim","HEADER_LINE","dataStart","undefined","dataEnd","base64","latin1String","atob","uint8Array","i","charCodeAt","decodeBase64","unpackMegolmKeyFile","ciphertextLength","salt","subarray","iv","iterations","ciphertext","hmac","aesKey","hmacKey","deriveKeys","toVerify","isValid","plaintext","verify","name","decrypt","counter","encryptMegolmKeyFile","options","kdfRounds","kdf_rounds","getRandomValues","encodedData","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":"4FAAA,+FAwCeA,cAAiB,CAC5BC,Y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