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

{"version":3,"sources":["node_modules/text-encoding-utf-8/lib/encoding.lib.mjs","node_modules/matrix-react-sdk/lib/utils/MegolmExportEncryption.js"],"names":["inRange","a","min","max","ToDictionary","o","undefined","Object","TypeError","end_of_stream","Stream","tokens","this","slice","call","prototype","endOfStream","length","read","shift","prepend","token","Array","isArray","unshift","pop","push","finished","decoderError","fatal","opt_code_point","DEFAULT_ENCODING","TextDecoder","encoding","options","String","toLowerCase","Error","_streaming","_BOMseen","_decoder","_fatal","Boolean","_ignoreBOM","defineProperty","value","TextEncoder","_encoder","_options","UTF8Decoder","utf8_code_point","utf8_bytes_seen","utf8_bytes_needed","utf8_lower_boundary","utf8_upper_boundary","handler","stream","bite","code_point","UTF8Encoder","count","offset","bytes","temp","decode","input","ArrayBuffer","Uint8Array","buffer","byteOffset","byteLength","result","input_stream","code_points","apply","indexOf","s","i","cp","fromCharCode","codePointsToString","encode","opt_string","string","n","u","c","charCodeAt","d","b","stringToCodePoints","exports","encryptMegolmKeyFile","decryptMegolmKeyFile","_ref","_ref4","_ref7","_promise2","_interopRequireDefault","_regenerator2","_slicedToArray3","_bluebird","deriveKeys","coroutine","default","mark","_callee","data","password","body","ciphertextLength","salt","iv","iterations","ciphertext","hmac","_ref2","_ref3","aesKey","hmacKey","toVerify","isValid","plaintext","wrap","_context","prev","next","unpackMegolmKeyFile","friendlyError","_languageHandler","_t","subarray","resolve","sent","subtleCrypto","verify","name","t0","cryptoFailMsg","decrypt","counter","t1","abrupt","stop","_x","_x2","arguments","_callee2","kdfRounds","_ref5","_ref6","encodedData","cipherArray","bodyLength","resultBuffer","idx","toSign","hmacArray","_context2","kdf_rounds","window","crypto","getRandomValues","encrypt","set","sign","packMegolmKeyFile","_x3","_x4","_x5","_callee3","start","key","keybits","now","aesProm","hmacProm","_context3","Date","importKey","deriveBits","hash","console","log","catch","e","all","_x6","_x7","_x8","TextEncodingUtf8","obj","__esModule","newObj","hasOwnProperty","_interopRequireWildcard","subtle","webkitSubtle","msg","friendlyText","HEADER_LINE","TRAILER_LINE","fileStr","lineStart","lineEnd","line","trim","dataStart","_lineEnd","dataEnd","base64","latin1String","atob","uint8Array","decodeBase64","nLines","Math","ceil","lines","btoa","join"],"mappings":"0FAeA,SAASA,EAAQC,EAAGC,EAAKC,GACvB,OAAOD,GAAOD,GAAKA,GAAKE,EAO1B,SAASC,EAAaC,GACpB,QAAUC,IAAND,EAAiB,MAAO,GAC5B,GAAIA,IAAME,OAAOF,GAAI,OAAOA,EAC5B,MAAMG,UAAU,4CA1BlB,+FAiJI,IAAIC,GAAiB,EASzB,SAASC,EAAOC,GAEdC,KAAKD,OAAS,GAAGE,MAAMC,KAAKH,GAG9BD,EAAOK,UAAY,CAIjBC,YAAa,WACX,OAAQJ,KAAKD,OAAOM,QAWrBC,KAAM,WACL,OAAKN,KAAKD,OAAOM,OAETL,KAAKD,OAAOQ,QADXV,GAWXW,QAAS,SAASC,GAChB,GAAIC,MAAMC,QAAQF,GAEhB,IADA,IAAIV,EAAqC,EAClCA,EAAOM,QACZL,KAAKD,OAAOa,QAAQb,EAAOc,YAE7Bb,KAAKD,OAAOa,QAAQH,IAWxBK,KAAM,SAASL,GACb,GAAIC,MAAMC,QAAQF,GAEhB,IADA,IAAIV,EAAqC,EAClCA,EAAOM,QACZL,KAAKD,OAAOe,KAAKf,EAAOQ,cAE1BP,KAAKD,OAAOe,KAAKL,KAYvB,IAAIM,GAAY,EAOhB,SAASC,EAAaC,EAAOC,GAC3B,GAAID,EACF,MAAMrB,UAAU,iBAClB,OAAOsB,GAAkB,MA+Bb,IAAIC,EAAmB,QAUrC,SAASC,EAAYC,EAAUC,GAC7B,KAAMtB,gBAAgBoB,GACpB,OAAO,IAAIA,EAAYC,EAAUC,GAGnC,IADAD,OAAwB3B,IAAb2B,EAAyBE,OAAOF,GAAUG,cAAgBL,KACpDA,EACf,MAAM,IAAIM,MAAM,mDAElBH,E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