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
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/dist/FileSaver.min.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","c","a","b","d","XMLHttpRequest","open","responseType","onload","g","response","onerror","send","status","dispatchEvent","MouseEvent","document","createEvent","initMouseEvent","window","self","global","navigator","test","userAgent","HTMLAnchorElement","prototype","h","i","URL","webkitURL","j","createElement","name","download","rel","href","origin","location","target","createObjectURL","setTimeout","revokeObjectURL","msSaveOrOpenBlob","autoBom","warn","body","innerText","HTMLElement","safari","FileReader","onloadend","result","replace","readAsDataURL","l","m","module","exports","subtleCrypto","crypto","subtle","webkitSubtle","friendlyError","Error","cryptoFailMsg","async","decryptMegolmKeyFile","data","password","fileStr","TextDecoder","decode","Uint8Array","lineStart","lineEnd","indexOf","line","slice","trim","HEADER_LINE","dataStart","undefined","dataEnd","base64","latin1String","atob","uint8Array","length","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","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":"qPA4Be,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,EAAMH,EAAEI,cAAgB5B,YAAG,iBACjCP,KAAKK,SAAS,CACVC,OAAQ4B,EACRrB,MAnEG,MAuEXb,KAAKK,SAAS,CACVC,OAAQ,KACRO,MAxEY,IAkFpBuB,SACI,MAAMC,EAAaC,eAAiB,4BAE9BC,E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