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","TextEncoder","TextEncodingUtf8","TextDecoder","subtleCrypto","crypto","subtle","webkitSubtle","friendlyError","Error","cryptoFailMsg","async","decryptMegolmKeyFile","data","password","fileStr","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","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":"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,EAAMH,EAAEI,cAAgB5B,YAAG,iBACjCP,KAAKK,SAAS,CACVC,OAAQ4B,EACRrB,MAnEG,MAuEXb,KAAKK,SAAS,CACVC,OAAQ,KACRO,MAxEY,IAkFpBuB,SACI,MAAMC,EAAaC,eAAi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