@@ -51249,8 +51249,8 @@ module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArgum
5124951249 * @author Vivek Nair (https://nair.me) <vivek@nair.me>
5125051250 */
5125151251
51252- const { encrypt } = __webpack_require__(9208);
51253- const { argon2id } = __webpack_require__(964);
51252+ const { encrypt } = __webpack_require__(9208)
51253+ const { argon2id } = __webpack_require__(964)
5125451254
5125551255/**
5125651256 * Update the time and/or memory cost of an existing multi-factor derived key.
@@ -51285,32 +51285,32 @@ const { argon2id } = __webpack_require__(964);
5128551285 * @memberOf MFKDFDerivedKey
5128651286 * @async
5128751287 */
51288- async function strengthen(time = 0, memory = 0) {
51289- if (typeof time !== " number" || time < 0 || !Number.isInteger(time)) {
51290- throw new TypeError(" time must be a non-negative integer");
51288+ async function strengthen (time = 0, memory = 0) {
51289+ if (typeof time !== ' number' || time < 0 || !Number.isInteger(time)) {
51290+ throw new TypeError(' time must be a non-negative integer')
5129151291 }
51292- if (typeof memory !== " number" || memory < 0 || !Number.isInteger(memory)) {
51293- throw new TypeError(" memory must be a non-negative integer");
51292+ if (typeof memory !== ' number' || memory < 0 || !Number.isInteger(memory)) {
51293+ throw new TypeError(' memory must be a non-negative integer')
5129451294 }
5129551295
51296- this.policy.time = time;
51297- this.policy.memory = memory;
51296+ this.policy.time = time
51297+ this.policy.memory = memory
5129851298
5129951299 const kek = Buffer.from(
5130051300 await argon2id({
5130151301 password: this.secret,
51302- salt: Buffer.from(this.policy.salt, " base64" ),
51302+ salt: Buffer.from(this.policy.salt, ' base64' ),
5130351303 hashLength: 32,
5130451304 parallelism: 1,
5130551305 iterations: 2 + Math.max(0, time),
5130651306 memorySize: 19456 + Math.max(0, memory),
51307- outputType: " binary",
51307+ outputType: ' binary'
5130851308 })
51309- );
51309+ )
5131051310
51311- this.policy.key = encrypt(this.key, kek).toString(" base64");
51311+ this.policy.key = encrypt(this.key, kek).toString(' base64')
5131251312}
51313- module.exports.strengthen = strengthen;
51313+ module.exports.strengthen = strengthen
5131451314
5131551315
5131651316/***/ }),
0 commit comments