@sequencemedia/pbkdf2 1.0.10 → 1.0.11

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/README.md CHANGED
@@ -13,8 +13,10 @@ A password can be compared with a `hash` and `salt` (and the number of `iteratio
13
13
  The ES functions expect the same argument types as the underlying Node utilities
14
14
 
15
15
  - The `hash` is a `Buffer`
16
- - The `salt` is a `String`
16
+ - The `salt` is a `Buffer`
17
17
  - `iterations` is a `Number`
18
+ - `keylen` is a `Number`
19
+ - `digest` is a `String`
18
20
 
19
21
  Etc.
20
22
 
package/compare.sh CHANGED
@@ -34,7 +34,7 @@ npm run compare -- \
34
34
  --digest 'sha256' \
35
35
  --keylen 64
36
36
 
37
- # the-user-3
37
+ # the-user-3 (UMS)
38
38
  npm run compare -- \
39
39
  --password '@^EJmdlkt5A#' \
40
40
  --hash 'bV76sVqsM0doKBFnaHsZQC9OgcVnF/+gzkG7HFXdD7jyQdN1PqCVijyXKMijmYQPWJohi5f7sVxhoLJ5kf8aQA==' \
package/package.json CHANGED
@@ -1,60 +1,60 @@
1
- {
2
- "name": "@sequencemedia/pbkdf2",
3
- "version": "1.0.10",
4
- "keywords": [
5
- "pbkdf2",
6
- "crypto",
7
- "compare",
8
- "hash",
9
- "salt",
10
- "ecmascript",
11
- "typescript"
12
- ],
13
- "main": "./index.mjs",
14
- "type": "module",
15
- "author": {
16
- "name": "Jonathan Perry for Sequence Media Limited",
17
- "email": "sequencemedia@sequencemedia.net",
18
- "url": "http://sequencemedia.net"
19
- },
20
- "license": "ISC",
21
- "repository": {
22
- "type": "git",
23
- "url": "git@github.com:sequencemedia/pbkdf2.git"
24
- },
25
- "scripts": {
26
- "lint": "eslint . --ext .mjs --ext .cjs",
27
- "lint:fix": "npm run lint -- --fix",
28
- "test": "cross-env NODE_ENV=test mocha tests --recursive --verbose --color",
29
- "compare": "node scripts/compare.mjs",
30
- "hash": "node scripts/hash.mjs",
31
- "salt": "node scripts/salt.mjs",
32
- "prepare": "husky install"
33
- },
34
- "dependencies": {
35
- "debug": "^4.3.4",
36
- "yargs-parser": "^21.1.1"
37
- },
38
- "devDependencies": {
39
- "@babel/cli": "^7.20.7",
40
- "@babel/core": "^7.20.12",
41
- "@babel/eslint-parser": "^7.19.1",
42
- "@babel/preset-env": "^7.20.2",
43
- "@sequencemedia/hooks": "^1.0.320",
44
- "@types/node": "^18.11.18",
45
- "chai": "^4.3.7",
46
- "core-js": "^3.27.2",
47
- "cross-env": "^7.0.3",
48
- "eslint": "^8.33.0",
49
- "eslint-config-standard": "^17.0.0",
50
- "eslint-plugin-import": "^2.27.5",
51
- "eslint-plugin-node": "^11.1.0",
52
- "eslint-plugin-promise": "^6.1.1",
53
- "husky": "^8.0.3",
54
- "mocha": "^10.2.0"
55
- },
56
- "imports": {
57
- "#config/*": "./config/*.mjs",
58
- "#utils/*": "./utils/*.mjs"
59
- }
60
- }
1
+ {
2
+ "name": "@sequencemedia/pbkdf2",
3
+ "version": "1.0.11",
4
+ "keywords": [
5
+ "pbkdf2",
6
+ "crypto",
7
+ "compare",
8
+ "hash",
9
+ "salt",
10
+ "ecmascript",
11
+ "typescript"
12
+ ],
13
+ "main": "./index.mjs",
14
+ "type": "module",
15
+ "author": {
16
+ "name": "Jonathan Perry for Sequence Media Limited",
17
+ "email": "sequencemedia@sequencemedia.net",
18
+ "url": "http://sequencemedia.net"
19
+ },
20
+ "license": "ISC",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git@github.com:sequencemedia/pbkdf2.git"
24
+ },
25
+ "scripts": {
26
+ "lint": "eslint . --ext .mjs --ext .cjs",
27
+ "lint:fix": "npm run lint -- --fix",
28
+ "test": "cross-env NODE_ENV=test mocha tests --recursive --verbose --color",
29
+ "compare": "node scripts/compare.mjs",
30
+ "hash": "node scripts/hash.mjs",
31
+ "salt": "node scripts/salt.mjs",
32
+ "prepare": "husky install"
33
+ },
34
+ "dependencies": {
35
+ "debug": "^4.3.4",
36
+ "yargs-parser": "^21.1.1"
37
+ },
38
+ "devDependencies": {
39
+ "@babel/cli": "^7.20.7",
40
+ "@babel/core": "^7.20.12",
41
+ "@babel/eslint-parser": "^7.19.1",
42
+ "@babel/preset-env": "^7.20.2",
43
+ "@sequencemedia/hooks": "^1.0.320",
44
+ "@types/node": "^18.11.18",
45
+ "chai": "^4.3.7",
46
+ "core-js": "^3.27.2",
47
+ "cross-env": "^7.0.3",
48
+ "eslint": "^8.33.0",
49
+ "eslint-config-standard": "^17.0.0",
50
+ "eslint-plugin-import": "^2.27.5",
51
+ "eslint-plugin-node": "^11.1.0",
52
+ "eslint-plugin-promise": "^6.1.1",
53
+ "husky": "^8.0.3",
54
+ "mocha": "^10.2.0"
55
+ },
56
+ "imports": {
57
+ "#config/*": "./config/*.mjs",
58
+ "#utils/*": "./utils/*.mjs"
59
+ }
60
+ }
package/utils/common.mjs CHANGED
@@ -5,11 +5,3 @@ export function fromBase64ToBuffer (string) {
5
5
  export function fromBufferToBase64 (buffer) {
6
6
  return buffer.toString('base64')
7
7
  }
8
-
9
- export function fromBase64 (string) {
10
- return Buffer.from(string, 'base64').toString('ascii')
11
- }
12
-
13
- export function toBase64 (string) {
14
- return Buffer.from(string).toString('base64')
15
- }