mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 03:01:04 +00:00
1 line
10 KiB
Plaintext
1 line
10 KiB
Plaintext
{"dependencies":[{"name":"@stablelib/hmac","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":13,"index":175},"end":{"line":5,"column":39,"index":201}}],"key":"y0E+dgeiZBAcgFK/fVp86inFbbs=","exportNames":["*"],"imports":1}},{"name":"@stablelib/wipe","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":6,"column":13,"index":216},"end":{"line":6,"column":39,"index":242}}],"key":"TyIdzPP7juhR0JJ+s4X6EUIb7Vg=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n // Copyright (C) 2016 Dmitry Chestnykh\n // MIT License. See LICENSE file for details.\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n var hmac_1 = require(_dependencyMap[0], \"@stablelib/hmac\");\n var wipe_1 = require(_dependencyMap[1], \"@stablelib/wipe\");\n /**\n * HMAC-based Extract-and-Expand Key Derivation Function.\n *\n * Implements HKDF from RFC5869.\n *\n * Expands the given master key with salt and info into\n * a limited stream of key material.\n */\n var HKDF = /** @class */function () {\n /**\n * Create a new HKDF instance for the given hash function\n * with the master key, optional salt, and info.\n *\n * - Master key is a high-entropy secret key (not a password).\n * - Salt is a non-secret random value.\n * - Info is application- and/or context-specific information.\n */\n function HKDF(hash, key, salt, info) {\n if (salt === void 0) {\n salt = new Uint8Array(0);\n }\n this._counter = new Uint8Array(1); // starts with zero\n this._hash = hash;\n this._info = info;\n // HKDF-Extract uses salt as HMAC key, and key as data.\n var okm = hmac_1.hmac(this._hash, salt, key);\n // Initialize HMAC for expanding with extracted key.\n this._hmac = new hmac_1.HMAC(hash, okm);\n // Allocate buffer.\n this._buffer = new Uint8Array(this._hmac.digestLength);\n this._bufpos = this._buffer.length;\n }\n // Fill buffer with new block of HKDF-Extract output.\n HKDF.prototype._fillBuffer = function () {\n // Increment counter.\n this._counter[0]++;\n var ctr = this._counter[0];\n // Check if counter overflowed.\n if (ctr === 0) {\n throw new Error(\"hkdf: cannot expand more\");\n }\n // Prepare HMAC instance for new data with old key.\n this._hmac.reset();\n // Hash in previous output if it was generated\n // (i.e. counter is greater than 1).\n if (ctr > 1) {\n this._hmac.update(this._buffer);\n }\n // Hash in info if it exists.\n if (this._info) {\n this._hmac.update(this._info);\n }\n // Hash in the counter.\n this._hmac.update(this._counter);\n // Output result to buffer and clean HMAC instance.\n this._hmac.finish(this._buffer);\n // Reset buffer position.\n this._bufpos = 0;\n };\n /**\n * Expand returns next key material of the given length.\n *\n * It throws if expansion limit is reached (which is\n * 254 digests of the underlying HMAC function).\n */\n HKDF.prototype.expand = function (length) {\n var out = new Uint8Array(length);\n for (var i = 0; i < out.length; i++) {\n if (this._bufpos === this._buffer.length) {\n this._fillBuffer();\n }\n out[i] = this._buffer[this._bufpos++];\n }\n return out;\n };\n HKDF.prototype.clean = function () {\n this._hmac.clean();\n wipe_1.wipe(this._buffer);\n wipe_1.wipe(this._counter);\n this._bufpos = 0;\n };\n return HKDF;\n }();\n exports.HKDF = HKDF;\n // TODO(dchest): maybe implement deriveKey?\n});","lineCount":96,"map":[[2,2,1,0],[2,14,1,12],[4,2,2,0],[5,2,3,0],[6,2,4,0,"Object"],[6,8,4,6],[6,9,4,7,"defineProperty"],[6,23,4,21],[6,24,4,22,"exports"],[6,31,4,29],[6,33,4,31],[6,45,4,43],[6,47,4,45],[7,4,4,47,"value"],[7,9,4,52],[7,11,4,54],[8,2,4,59],[8,3,4,60],[8,4,4,61],[9,2,5,0],[9,6,5,4,"hmac_1"],[9,12,5,10],[9,15,5,13,"require"],[9,22,5,20],[9,23,5,20,"_dependencyMap"],[9,37,5,20],[9,59,5,38],[9,60,5,39],[10,2,6,0],[10,6,6,4,"wipe_1"],[10,12,6,10],[10,15,6,13,"require"],[10,22,6,20],[10,23,6,20,"_dependencyMap"],[10,37,6,20],[10,59,6,38],[10,60,6,39],[11,2,7,0],[12,0,8,0],[13,0,9,0],[14,0,10,0],[15,0,11,0],[16,0,12,0],[17,0,13,0],[18,0,14,0],[19,2,15,0],[19,6,15,4,"HKDF"],[19,10,15,8],[19,13,15,11],[19,26,15,26],[19,38,15,38],[20,4,16,4],[21,0,17,0],[22,0,18,0],[23,0,19,0],[24,0,20,0],[25,0,21,0],[26,0,22,0],[27,0,23,0],[28,4,24,4],[28,13,24,13,"HKDF"],[28,17,24,17,"HKDF"],[28,18,24,18,"hash"],[28,22,24,22],[28,24,24,24,"key"],[28,27,24,27],[28,29,24,29,"salt"],[28,33,24,33],[28,35,24,35,"info"],[28,39,24,39],[28,41,24,41],[29,6,25,8],[29,10,25,12,"salt"],[29,14,25,16],[29,19,25,21],[29,24,25,26],[29,25,25,27],[29,27,25,29],[30,8,25,31,"salt"],[30,12,25,35],[30,15,25,38],[30,19,25,42,"Uint8Array"],[30,29,25,52],[30,30,25,53],[30,31,25,54],[30,32,25,55],[31,6,25,57],[32,6,26,8],[32,10,26,12],[32,11,26,13,"_counter"],[32,19,26,21],[32,22,26,24],[32,26,26,28,"Uint8Array"],[32,36,26,38],[32,37,26,39],[32,38,26,40],[32,39,26,41],[32,40,26,42],[32,41,26,43],[33,6,27,8],[33,10,27,12],[33,11,27,13,"_hash"],[33,16,27,18],[33,19,27,21,"hash"],[33,23,27,25],[34,6,28,8],[34,10,28,12],[34,11,28,13,"_info"],[34,16,28,18],[34,19,28,21,"info"],[34,23,28,25],[35,6,29,8],[36,6,30,8],[36,10,30,12,"okm"],[36,13,30,15],[36,16,30,18,"hmac_1"],[36,22,30,24],[36,23,30,25,"hmac"],[36,27,30,29],[36,28,30,30],[36,32,30,34],[36,33,30,35,"_hash"],[36,38,30,40],[36,40,30,42,"salt"],[36,44,30,46],[36,46,30,48,"key"],[36,49,30,51],[36,50,30,52],[37,6,31,8],[38,6,32,8],[38,10,32,12],[38,11,32,13,"_hmac"],[38,16,32,18],[38,19,32,21],[38,23,32,25,"hmac_1"],[38,29,32,31],[38,30,32,32,"HMAC"],[38,34,32,36],[38,35,32,37,"hash"],[38,39,32,41],[38,41,32,43,"okm"],[38,44,32,46],[38,45,32,47],[39,6,33,8],[40,6,34,8],[40,10,34,12],[40,11,34,13,"_buffer"],[40,18,34,20],[40,21,34,23],[40,25,34,27,"Uint8Array"],[40,35,34,37],[40,36,34,38],[40,40,34,42],[40,41,34,43,"_hmac"],[40,46,34,48],[40,47,34,49,"digestLength"],[40,59,34,61],[40,60,34,62],[41,6,35,8],[41,10,35,12],[41,11,35,13,"_bufpos"],[41,18,35,20],[41,21,35,23],[41,25,35,27],[41,26,35,28,"_buffer"],[41,33,35,35],[41,34,35,36,"length"],[41,40,35,42],[42,4,36,4],[43,4,37,4],[44,4,38,4,"HKDF"],[44,8,38,8],[44,9,38,9,"prototype"],[44,18,38,18],[44,19,38,19,"_fillBuffer"],[44,30,38,30],[44,33,38,33],[44,45,38,45],[45,6,39,8],[46,6,40,8],[46,10,40,12],[46,11,40,13,"_counter"],[46,19,40,21],[46,20,40,22],[46,21,40,23],[46,22,40,24],[46,24,40,26],[47,6,41,8],[47,10,41,12,"ctr"],[47,13,41,15],[47,16,41,18],[47,20,41,22],[47,21,41,23,"_counter"],[47,29,41,31],[47,30,41,32],[47,31,41,33],[47,32,41,34],[48,6,42,8],[49,6,43,8],[49,10,43,12,"ctr"],[49,13,43,15],[49,18,43,20],[49,19,43,21],[49,21,43,23],[50,8,44,12],[50,14,44,18],[50,18,44,22,"Error"],[50,23,44,27],[50,24,44,28],[50,50,44,54],[50,51,44,55],[51,6,45,8],[52,6,46,8],[53,6,47,8],[53,10,47,12],[53,11,47,13,"_hmac"],[53,16,47,18],[53,17,47,19,"reset"],[53,22,47,24],[53,23,47,25],[53,24,47,26],[54,6,48,8],[55,6,49,8],[56,6,50,8],[56,10,50,12,"ctr"],[56,13,50,15],[56,16,50,18],[56,17,50,19],[56,19,50,21],[57,8,51,12],[57,12,51,16],[57,13,51,17,"_hmac"],[57,18,51,22],[57,19,51,23,"update"],[57,25,51,29],[57,26,51,30],[57,30,51,34],[57,31,51,35,"_buffer"],[57,38,51,42],[57,39,51,43],[58,6,52,8],[59,6,53,8],[60,6,54,8],[60,10,54,12],[60,14,54,16],[60,15,54,17,"_info"],[60,20,54,22],[60,22,54,24],[61,8,55,12],[61,12,55,16],[61,13,55,17,"_hmac"],[61,18,55,22],[61,19,55,23,"update"],[61,25,55,29],[61,26,55,30],[61,30,55,34],[61,31,55,35,"_info"],[61,36,55,40],[61,37,55,41],[62,6,56,8],[63,6,57,8],[64,6,58,8],[64,10,58,12],[64,11,58,13,"_hmac"],[64,16,58,18],[64,17,58,19,"update"],[64,23,58,25],[64,24,58,26],[64,28,58,30],[64,29,58,31,"_counter"],[64,37,58,39],[64,38,58,40],[65,6,59,8],[66,6,60,8],[66,10,60,12],[66,11,60,13,"_hmac"],[66,16,60,18],[66,17,60,19,"finish"],[66,23,60,25],[66,24,60,26],[66,28,60,30],[66,29,60,31,"_buffer"],[66,36,60,38],[66,37,60,39],[67,6,61,8],[68,6,62,8],[68,10,62,12],[68,11,62,13,"_bufpos"],[68,18,62,20],[68,21,62,23],[68,22,62,24],[69,4,63,4],[69,5,63,5],[70,4,64,4],[71,0,65,0],[72,0,66,0],[73,0,67,0],[74,0,68,0],[75,0,69,0],[76,4,70,4,"HKDF"],[76,8,70,8],[76,9,70,9,"prototype"],[76,18,70,18],[76,19,70,19,"expand"],[76,25,70,25],[76,28,70,28],[76,38,70,38,"length"],[76,44,70,44],[76,46,70,46],[77,6,71,8],[77,10,71,12,"out"],[77,13,71,15],[77,16,71,18],[77,20,71,22,"Uint8Array"],[77,30,71,32],[77,31,71,33,"length"],[77,37,71,39],[77,38,71,40],[78,6,72,8],[78,11,72,13],[78,15,72,17,"i"],[78,16,72,18],[78,19,72,21],[78,20,72,22],[78,22,72,24,"i"],[78,23,72,25],[78,26,72,28,"out"],[78,29,72,31],[78,30,72,32,"length"],[78,36,72,38],[78,38,72,40,"i"],[78,39,72,41],[78,41,72,43],[78,43,72,45],[79,8,73,12],[79,12,73,16],[79,16,73,20],[79,17,73,21,"_bufpos"],[79,24,73,28],[79,29,73,33],[79,33,73,37],[79,34,73,38,"_buffer"],[79,41,73,45],[79,42,73,46,"length"],[79,48,73,52],[79,50,73,54],[80,10,74,16],[80,14,74,20],[80,15,74,21,"_fillBuffer"],[80,26,74,32],[80,27,74,33],[80,28,74,34],[81,8,75,12],[82,8,76,12,"out"],[82,11,76,15],[82,12,76,16,"i"],[82,13,76,17],[82,14,76,18],[82,17,76,21],[82,21,76,25],[82,22,76,26,"_buffer"],[82,29,76,33],[82,30,76,34],[82,34,76,38],[82,35,76,39,"_bufpos"],[82,42,76,46],[82,44,76,48],[82,45,76,49],[83,6,77,8],[84,6,78,8],[84,13,78,15,"out"],[84,16,78,18],[85,4,79,4],[85,5,79,5],[86,4,80,4,"HKDF"],[86,8,80,8],[86,9,80,9,"prototype"],[86,18,80,18],[86,19,80,19,"clean"],[86,24,80,24],[86,27,80,27],[86,39,80,39],[87,6,81,8],[87,10,81,12],[87,11,81,13,"_hmac"],[87,16,81,18],[87,17,81,19,"clean"],[87,22,81,24],[87,23,81,25],[87,24,81,26],[88,6,82,8,"wipe_1"],[88,12,82,14],[88,13,82,15,"wipe"],[88,17,82,19],[88,18,82,20],[88,22,82,24],[88,23,82,25,"_buffer"],[88,30,82,32],[88,31,82,33],[89,6,83,8,"wipe_1"],[89,12,83,14],[89,13,83,15,"wipe"],[89,17,83,19],[89,18,83,20],[89,22,83,24],[89,23,83,25,"_counter"],[89,31,83,33],[89,32,83,34],[90,6,84,8],[90,10,84,12],[90,11,84,13,"_bufpos"],[90,18,84,20],[90,21,84,23],[90,22,84,24],[91,4,85,4],[91,5,85,5],[92,4,86,4],[92,11,86,11,"HKDF"],[92,15,86,15],[93,2,87,0],[93,3,87,1],[93,4,87,2],[93,5,87,4],[94,2,88,0,"exports"],[94,9,88,7],[94,10,88,8,"HKDF"],[94,14,88,12],[94,17,88,15,"HKDF"],[94,21,88,19],[95,2,89,0],[96,0,89,0],[96,3]],"functionMap":{"names":["<global>","<anonymous>","HKDF","HKDF.prototype._fillBuffer","HKDF.prototype.expand","HKDF.prototype.clean"],"mappings":"AAA;0BCc;ICS;KDY;iCEE;KFyB;4BGO;KHS;2BIC;KJK;CDE"},"hasCjsExports":true},"type":"js/module"}]} |