Skip to content

Commit 067da8d

Browse files
committed
2.0.0-7
1 parent 2717f46 commit 067da8d

3 files changed

Lines changed: 17 additions & 17 deletions

File tree

mfkdf.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -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
/***/ }),

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mfkdf",
3-
"version": "2.0.0-6",
3+
"version": "2.0.0-7",
44
"description": "JavaScript Implementation of a Next-Generation Multi-Factor Key Derivation Function (MFKDF2)",
55
"main": "src/index.js",
66
"engines": {

0 commit comments

Comments
 (0)