@sequencemedia/pbkdf2 1.1.50 → 1.1.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/common/index.mjs +4 -4
- package/src/compare.mjs +3 -3
- package/src/hash.mjs +3 -3
- package/src/salt.mjs +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sequencemedia/pbkdf2",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.51",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"pbkdf2",
|
|
6
6
|
"crypto",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"yargs-parser": "^21.1.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@sequencemedia/eslint-config-standard": "^0.2.
|
|
41
|
-
"@sequencemedia/eslint-config-typescript": "^0.1.
|
|
40
|
+
"@sequencemedia/eslint-config-standard": "^0.2.57",
|
|
41
|
+
"@sequencemedia/eslint-config-typescript": "^0.1.89",
|
|
42
42
|
"@types/chai": "^5.2.2",
|
|
43
43
|
"@types/mocha": "^10.0.10",
|
|
44
44
|
"@types/node": "^22.15.17",
|
package/src/common/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* @param {string} string
|
|
3
|
+
* @returns {Buffer}
|
|
4
4
|
*/
|
|
5
5
|
export function fromBase64ToBuffer (string) {
|
|
6
6
|
return Buffer.from(string, 'base64')
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* @param {Buffer} buffer
|
|
11
|
+
* @returns {string}
|
|
12
12
|
*/
|
|
13
13
|
export function fromBufferToBase64 (buffer) {
|
|
14
14
|
return buffer.toString('base64')
|
package/src/compare.mjs
CHANGED
|
@@ -22,9 +22,9 @@ import {
|
|
|
22
22
|
import hash from './hash.mjs'
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
25
|
+
* @param {BinaryLike} password
|
|
26
|
+
* @param {CompareParams} params
|
|
27
|
+
* @returns {Promise<boolean>}
|
|
28
28
|
*/
|
|
29
29
|
export default async function compare (password, {
|
|
30
30
|
hash: alpha,
|
package/src/hash.mjs
CHANGED
|
@@ -19,9 +19,9 @@ import {
|
|
|
19
19
|
} from '#config/compare'
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
22
|
+
* @param {BinaryLike} password
|
|
23
|
+
* @param {HashParams} params
|
|
24
|
+
* @returns {Promise<Buffer>}
|
|
25
25
|
*/
|
|
26
26
|
export default function hash (password, {
|
|
27
27
|
salt,
|