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
11 KiB

{"version":3,"sources":["webpack:///./node_modules/matrix-react-sdk/src/async-components/views/dialogs/security/ExportE2eKeysDialog.js","webpack:///./node_modules/file-saver/FileSaver.js","webpack:///(webpack)/buildin/amd-define.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///./node_modules/matrix-react-sdk/src/utils/MegolmExportEncryption.js"],"names":["ExportE2eKeysDialog","React","Component","constructor","props","super","ev","preventDefault","passphrase","this","_passphrase1","current","value","_passphrase2","setState","errStr","_t","_startExport","onFinished","_unmounted","createRef","state","phase","componentWillUnmount","Promise","resolve","then","matrixClient","exportRoomKeys","k","MegolmExportEncryption","JSON","stringify","f","blob","Blob","type","FileSaver","saveAs","catch","e","console","error","msg","friendlyText","render","BaseDialog","sdk","disableForm","className","title","onSubmit","_onPassphraseFormSubmit","htmlFor","ref","id","autoFocus","size","disabled","onClick","_onCancelClick","PropTypes","instanceOf","MatrixClient","isRequired","func","view","navigator","test","userAgent","doc","document","get_URL","URL","webkitURL","save_link","createElementNS","can_use_save_link","is_safari","HTMLElement","safari","is_chrome_ios","throw_outside","ex","setImmediate","setTimeout","revoke","file","revokeObjectURL","remove","auto_bom","String","fromCharCode","name","no_auto_bom","object_url","filesaver","force","dispatch_all","event_types","event","i","concat","length","listener","call","dispatch","split","readyState","INIT","createObjectURL","node","href","download","MouseEvent","dispatchEvent","DONE","FileReader","reader","onloadend","url","result","replace","open","location","undefined","readAsDataURL","fs_error","FS_proto","prototype","msSaveOrOpenBlob","abort","WRITING","onwritestart","onprogress","onwrite","onabort","onerror","onwriteend","self","window","content","module","exports","Error","__webpack_amd_options__","TextEncoder","TextEncodingUtf8","TextDecoder","subtleCrypto","crypto","subtle","webkitSubtle","friendlyError","cryptoFailMsg","async","decryptMegolmKeyFile","data","password","body","fileStr","decode","Uint8Array","lineStart","lineEnd","indexOf","line","slice","trim","HEADER_LINE","dataStart","dataEnd","base64","latin1String","atob","uint8Array","charCodeAt","decodeBase64","unpackMegolmKeyFile","brand","SdkConfig","get","ciphertextLength","salt","subarray","iv","iterations","ciphertext","hmac","aesKey","hmacKey","deriveKeys","toVerify","isValid","plaintext","verify","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","apply","btoa"],"mappings":";oPA4Be,MAAMA,UAA4BC,IAAMC,UAMnDC,YAAYC,GACRC,MAAMD,GADS,mCAkBQE,IACvBA,EAAGC,iBAEH,MAAMC,EAAaC,KAAKC,aAAaC,QAAQC,MAC7C,OAAIJ,IAAeC,KAAKI,aAAaF,QAAQC,OACzCH,KAAKK,SAAS,CAACC,OAAQC,YAAG,6BACnB,GAENR,GAKLC,KAAKQ,aAAaT,IACX,IALHC,KAAKK,SAAS,CAACC,OAAQC,YAAG,mCACnB,KA5BI,0BAoEDV,IACdA,EAAGC,iBACHE,KAAKL,MAAMc,YAAW,IACf,IApEPT,KAAKU,YAAa,EAElBV,KAAKC,aAAeU,sBACpBX,KAAKI,aAAeO,sBAEpBX,KAAKY,MAAQ,CACTC,MAlBO,EAmBPP,OAAQ,MAIhBQ,uBACId,KAAKU,YAAa,EAoBtBF,aAAaT,GAGTgB,QAAQC,UAAUC,KAAK,IACZjB,KAAKL,MAAMuB,aAAaC,kBAChCF,KAAMG,GACEC,IACHC,KAAKC,UAAUH,GAAIrB,IAExBkB,KAAMO,IACL,MAAMC,EAAO,IAAIC,KAAK,CAACF,GAAI,CACvBG,KAAM,gCAEVC,IAAUC,OAAOJ,EAAM,oBACvBzB,KAAKL,MAAMc,YAAW,KACvBqB,MAAOC,IAEN,GADAC,QAAQC,MAAM,4BAA6BF,GACvC/B,KAAKU,WACL,OAEJ,MAAMwB,EAAM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