Skip to content

Commit 617ac4d

Browse files
committed
v0.31.2
1 parent bdb087c commit 617ac4d

5 files changed

Lines changed: 146 additions & 128 deletions

File tree

argon2.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ export const defaults: Options;
3636
export const limits: OptionLimits;
3737
export function hash(
3838
plain: Buffer | string,
39-
options: Options & { raw: true }
39+
options: Options & { raw: true },
4040
): Promise<Buffer>;
4141
export function hash(
4242
plain: Buffer | string,
43-
options?: Options & { raw?: false }
43+
options?: Options & { raw?: false },
4444
): Promise<string>;
4545
export function verify(
4646
hash: string,
4747
plain: Buffer | string,
48-
options?: Options
48+
options?: Options,
4949
): Promise<boolean>;
5050
export function needsRehash(hash: string, options?: Options): boolean;

argon2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const assertLimits =
4444
const value = options[key];
4545
assert(
4646
min <= value && value <= max,
47-
`Invalid ${key}, must be between ${min} and ${max}.`
47+
`Invalid ${key}, must be between ${min} and ${max}.`,
4848
);
4949
};
5050

@@ -114,7 +114,7 @@ const verify = async (digest, plain, options) => {
114114
parallelism: +p,
115115
...(data ? { associatedData: Buffer.from(data, "base64") } : {}),
116116
}),
117-
hash
117+
hash,
118118
);
119119
};
120120

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "argon2",
3-
"version": "0.31.1",
3+
"version": "0.31.2",
44
"description": "An Argon2 library for Node",
55
"main": "argon2.js",
66
"files": [
@@ -51,10 +51,10 @@
5151
"node-addon-api": "^7.0.0"
5252
},
5353
"devDependencies": {
54-
"@types/node": "^20.4.6",
54+
"@types/node": "^20.8.10",
5555
"c8": "^8.0.1",
5656
"mocha": "^10.2.0",
57-
"node-gyp": "^9.4.0",
57+
"node-gyp": "^10.0.1",
5858
"prettier": "^3.0.0",
5959
"typescript": "^5.1.6"
6060
},

test/test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ const hashes = Object.freeze({
2222
"$argon2d$v=19$m=65536,t=3,p=4$c2FsdHNhbHRzYWx0c2FsdA$VtxJNl5Jr/yZ2UIhvfvL4sGPdDQyGCcy45Cs7rIdFq8",
2323
rawArgon2id: Buffer.from(
2424
"ac15942c3e63386a50cb7dab2ef19c9af40c56a2153409ab0ad7a45af500f1bc",
25-
"hex"
25+
"hex",
2626
),
2727
rawWithNull: Buffer.from(
2828
"36a7210cec7059b701cc0fb482db02b72b29110c6a2857f8fcf3bf02822fa3e4",
29-
"hex"
29+
"hex",
3030
),
3131
rawArgon2i: Buffer.from(
3232
"d42726a7b1026fe45be573e3a91c04b808c2b9f635c500ce2709c7ac1fa8ad9e",
33-
"hex"
33+
"hex",
3434
),
3535
rawArgon2d: Buffer.from(
3636
"56dc49365e49affc99d94221bdfbcbe2c18f743432182732e390aceeb21d16af",
37-
"hex"
37+
"hex",
3838
),
3939
oldFormat:
4040
"$argon2i$m=4096,t=3,p=1$tbagT6b1YH33niCo9lVzuA$htv/k+OqWk1V9zD9k5DOBi2kcfcZ6Xu3tWmwEPV3/nc",
@@ -235,7 +235,7 @@ describe("Argon2", () => {
235235
});
236236
assert(argon2.needsRehash(hash));
237237
assert(
238-
!argon2.needsRehash(hash, { memoryCost: defaults.memoryCost / 2 })
238+
!argon2.needsRehash(hash, { memoryCost: defaults.memoryCost / 2 }),
239239
);
240240
});
241241

0 commit comments

Comments
 (0)