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
52 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","__webpack_require__","r","__webpack_exports__","d","TextEncoder","TextDecoder","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","encoding","options","String","toLowerCase","Error","_streaming","_BOMseen","_decoder","_fatal","Boolean","_ignoreBOM","defineProperty","value","_encoder","_options","decode","input","bytes","ArrayBuffer","Uint8Array","buffer","byteOffset","byteLength","utf8_code_point","utf8_bytes_seen","utf8_bytes_needed","utf8_lower_boundary","utf8_upper_boundary","handler","stream","bite","code_point","result","input_stream","code_points","apply","indexOf","s","i","cp","fromCharCode","codePointsToString","encode","opt_string","count","offset","temp","string","n","u","c","charCodeAt","b","stringToCodePoints","exports","encryptMegolmKeyFile","decryptMegolmKeyFile","_promise2","_interopRequireDefault","_regenerator2","_slicedToArray3","_bluebird","deriveKeys","_ref","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","_ref4","_callee2","kdfRounds","_ref5","_ref6","encodedData","cipherArray","bodyLength","resultBuffer","idx","toSign","hmacArray","_context2","kdf_rounds","window","crypto","getRandomValues","encrypt","set","sign","packMegolmKeyFile","_x3","_x4","_x5","_ref7","_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","encodeBase64","join","btoa"],"mappings":"0FAeA,SAAAA,EAAAC,EAAAC,EAAAC,GACA,OAAAD,GAAAD,MAAAE,EAOA,SAAAC,EAAAC,GACA,QAAAC,IAAAD,EAAA,SACA,GAAAA,IAAAE,OAAAF,GAAA,OAAAA,EACA,MAAAG,UAAA,4CA1BAC,EAAAC,EAAAC,GAAAF,EAAAG,EAAAD,EAAA,gCAAAE,IAAAJ,EAAAG,EAAAD,EAAA,gCAAAG,IAiJA,IAAAC,GAAA,EASA,SAAAC,EAAAC,GAEAC,KAAAD,UAAAE,MAAAC,KAAAH,GAGAD,EAAAK,WAIAC,YAAA,WACA,OAAAJ,KAAAD,OAAAM,QAWAC,KAAA,WACA,OAAAN,KAAAD,OAAAM,OAEAL,KAAAD,OAAAQ,QADAV,GAWAW,QAAA,SAAAC,GACA,GAAAC,MAAAC,QAAAF,GAEA,IADA,IAAAV,EAA6C,EAC7CA,EAAAM,QACAL,KAAAD,OAAAa,QAAAb,EAAAc,YAEAb,KAAAD,OAAAa,QAAAH,IAWAK,KAAA,SAAAL,GACA,GAAAC,MAAAC,QAAAF,GAEA,IADA,IAAAV,EAA6C,EAC7CA,EAAAM,QACAL,KAAAD,OAAAe,KAAAf,EAAAQ,cAEAP,KAAAD,OAAAe,KAAAL,KAYA,IAAAM,GAAA,EAOA,SAAAC,EAAAC,EAAAC,GACA,GAAAD,EACA,MAAA3B,UAAA,iBACA,OAAA4B,GAAA,MA+BA,IAAAC,EAAA,QAUA,SAAAvB,EAAAwB,EAAAC,GACA,KAAArB,gBAAAJ,GACA,WAAAA,EAAAwB,EAAAC,GAGA,IADAD,OAAAhC,IAAAgC,EAAAE,OAAAF,GAAAG,cAAAJ,K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