Comparing version 0.19.2 to 0.19.3
@@ -1,2 +0,2 @@ | ||
// Type definitions for argon2 v0.14.0 | ||
// Type definitions for argon2 v0.19.2 | ||
@@ -11,2 +11,3 @@ /// <reference types="node" /> | ||
type?: 0 | 1 | 2; | ||
version?: number; | ||
salt?: Buffer; | ||
@@ -13,0 +14,0 @@ raw?: boolean; |
@@ -13,2 +13,3 @@ 'use strict' | ||
hashLength: 32, | ||
saltLength: 16, | ||
timeCost: 3, | ||
@@ -49,3 +50,3 @@ memoryCost: 1 << 12, | ||
crypto.randomBytes(16, (err, salt) => { | ||
crypto.randomBytes(options.saltLength, (err, salt) => { | ||
/* istanbul ignore if */ | ||
@@ -89,3 +90,3 @@ if (err) { | ||
const { | ||
id: type, version, params: { | ||
id: type, version = 0x10, params: { | ||
m: memoryCost, t: timeCost, p: parallelism | ||
@@ -97,3 +98,3 @@ }, salt, hash | ||
type: module.exports[type], | ||
version: version ? +version : 0x10, | ||
version: +version, | ||
hashLength: hash.length, | ||
@@ -100,0 +101,0 @@ memoryCost: +memoryCost, |
{ | ||
"name": "argon2", | ||
"version": "0.19.1", | ||
"version": "0.19.2", | ||
"lockfileVersion": 1, | ||
@@ -21,8 +21,2 @@ "requires": true, | ||
}, | ||
"ansi-regex": { | ||
"version": "2.1.1", | ||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", | ||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", | ||
"dev": true | ||
}, | ||
"any-promise": { | ||
@@ -33,27 +27,2 @@ "version": "1.3.0", | ||
}, | ||
"aproba": { | ||
"version": "1.2.0", | ||
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", | ||
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", | ||
"dev": true | ||
}, | ||
"are-we-there-yet": { | ||
"version": "1.1.4", | ||
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", | ||
"integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", | ||
"dev": true, | ||
"requires": { | ||
"delegates": "^1.0.0", | ||
"readable-stream": "^2.0.6" | ||
} | ||
}, | ||
"async": { | ||
"version": "2.6.0", | ||
"resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", | ||
"integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", | ||
"dev": true, | ||
"requires": { | ||
"lodash": "^4.14.0" | ||
} | ||
}, | ||
"balanced-match": { | ||
@@ -70,12 +39,2 @@ "version": "1.0.0", | ||
}, | ||
"bl": { | ||
"version": "1.2.2", | ||
"resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", | ||
"integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", | ||
"dev": true, | ||
"requires": { | ||
"readable-stream": "^2.3.5", | ||
"safe-buffer": "^5.1.1" | ||
} | ||
}, | ||
"brace-expansion": { | ||
@@ -97,36 +56,2 @@ "version": "1.1.11", | ||
}, | ||
"buffer-alloc": { | ||
"version": "1.1.0", | ||
"resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.1.0.tgz", | ||
"integrity": "sha1-BVFNM78WVtNUDGhPZbEgLpDsowM=", | ||
"dev": true, | ||
"requires": { | ||
"buffer-alloc-unsafe": "^0.1.0", | ||
"buffer-fill": "^0.1.0" | ||
} | ||
}, | ||
"buffer-alloc-unsafe": { | ||
"version": "0.1.1", | ||
"resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-0.1.1.tgz", | ||
"integrity": "sha1-/+H2dVHdBVc33iUzN7/oU9+rGmo=", | ||
"dev": true | ||
}, | ||
"buffer-fill": { | ||
"version": "0.1.1", | ||
"resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-0.1.1.tgz", | ||
"integrity": "sha512-YgBMBzdRLEfgxJIGu2wrvI2E03tMCFU1p7d1KhB4BOoMN0VxmTFjSyN5JtKt9z8Z9JajMHruI6SE25W96wNv7Q==", | ||
"dev": true | ||
}, | ||
"chownr": { | ||
"version": "1.0.1", | ||
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", | ||
"integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", | ||
"dev": true | ||
}, | ||
"code-point-at": { | ||
"version": "1.1.0", | ||
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", | ||
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", | ||
"dev": true | ||
}, | ||
"commander": { | ||
@@ -144,14 +69,2 @@ "version": "2.11.0", | ||
}, | ||
"console-control-strings": { | ||
"version": "1.1.0", | ||
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", | ||
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", | ||
"dev": true | ||
}, | ||
"core-util-is": { | ||
"version": "1.0.2", | ||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", | ||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", | ||
"dev": true | ||
}, | ||
"debug": { | ||
@@ -166,29 +79,2 @@ "version": "3.1.0", | ||
}, | ||
"decompress-response": { | ||
"version": "3.3.0", | ||
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", | ||
"integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", | ||
"dev": true, | ||
"requires": { | ||
"mimic-response": "^1.0.0" | ||
} | ||
}, | ||
"deep-extend": { | ||
"version": "0.4.2", | ||
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", | ||
"integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", | ||
"dev": true | ||
}, | ||
"delegates": { | ||
"version": "1.0.0", | ||
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", | ||
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", | ||
"dev": true | ||
}, | ||
"detect-libc": { | ||
"version": "1.0.3", | ||
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", | ||
"integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", | ||
"dev": true | ||
}, | ||
"diff": { | ||
@@ -200,11 +86,2 @@ "version": "3.5.0", | ||
}, | ||
"end-of-stream": { | ||
"version": "1.4.1", | ||
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", | ||
"integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", | ||
"dev": true, | ||
"requires": { | ||
"once": "^1.4.0" | ||
} | ||
}, | ||
"escape-string-regexp": { | ||
@@ -216,14 +93,2 @@ "version": "1.0.5", | ||
}, | ||
"expand-template": { | ||
"version": "1.1.0", | ||
"resolved": "https://registry.npmjs.org/expand-template/-/expand-template-1.1.0.tgz", | ||
"integrity": "sha512-kkjwkMqj0h4w/sb32ERCDxCQkREMCAgS39DscDnSwDsbxnwwM1BTZySdC3Bn1lhY7vL08n9GoO/fVTynjDgRyQ==", | ||
"dev": true | ||
}, | ||
"fs-constants": { | ||
"version": "1.0.0", | ||
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", | ||
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", | ||
"dev": true | ||
}, | ||
"fs.realpath": { | ||
@@ -235,24 +100,2 @@ "version": "1.0.0", | ||
}, | ||
"gauge": { | ||
"version": "2.7.4", | ||
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", | ||
"integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", | ||
"dev": true, | ||
"requires": { | ||
"aproba": "^1.0.3", | ||
"console-control-strings": "^1.0.0", | ||
"has-unicode": "^2.0.0", | ||
"object-assign": "^4.1.0", | ||
"signal-exit": "^3.0.0", | ||
"string-width": "^1.0.1", | ||
"strip-ansi": "^3.0.1", | ||
"wide-align": "^1.1.0" | ||
} | ||
}, | ||
"github-from-package": { | ||
"version": "0.0.0", | ||
"resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", | ||
"integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=", | ||
"dev": true | ||
}, | ||
"glob": { | ||
@@ -284,8 +127,2 @@ "version": "7.1.2", | ||
}, | ||
"has-unicode": { | ||
"version": "2.0.1", | ||
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", | ||
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", | ||
"dev": true | ||
}, | ||
"he": { | ||
@@ -313,54 +150,2 @@ "version": "1.1.1", | ||
}, | ||
"ini": { | ||
"version": "1.3.5", | ||
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", | ||
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", | ||
"dev": true | ||
}, | ||
"is-fullwidth-code-point": { | ||
"version": "1.0.0", | ||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", | ||
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", | ||
"dev": true, | ||
"requires": { | ||
"number-is-nan": "^1.0.0" | ||
} | ||
}, | ||
"isarray": { | ||
"version": "1.0.0", | ||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", | ||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", | ||
"dev": true | ||
}, | ||
"lodash": { | ||
"version": "4.17.10", | ||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", | ||
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", | ||
"dev": true | ||
}, | ||
"microtime": { | ||
"version": "2.1.7", | ||
"resolved": "https://registry.npmjs.org/microtime/-/microtime-2.1.7.tgz", | ||
"integrity": "sha1-CQT251Xmp0UFUsGR9AmeIxy1+mw=", | ||
"dev": true, | ||
"requires": { | ||
"bindings": "1.3.x", | ||
"nan": "2.8.x", | ||
"prebuild-install": "^2.1.0" | ||
}, | ||
"dependencies": { | ||
"nan": { | ||
"version": "2.8.0", | ||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", | ||
"integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=", | ||
"dev": true | ||
} | ||
} | ||
}, | ||
"mimic-response": { | ||
"version": "1.0.0", | ||
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.0.tgz", | ||
"integrity": "sha1-3z02Uqc/3ta5sLJBRub9BSNTRY4=", | ||
"dev": true | ||
}, | ||
"minimatch": { | ||
@@ -420,41 +205,2 @@ "version": "3.0.4", | ||
}, | ||
"node-abi": { | ||
"version": "2.4.0", | ||
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.4.0.tgz", | ||
"integrity": "sha512-hRUz0vG+eJfSqwU6rOgW6wNyX85ec8OEE9n4A+u+eoiE8oTePhCkUFTNmwQ+86Kyu429PCLNNyI2P2jL9qKXhw==", | ||
"dev": true, | ||
"requires": { | ||
"semver": "^5.4.1" | ||
} | ||
}, | ||
"noop-logger": { | ||
"version": "0.1.1", | ||
"resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", | ||
"integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=", | ||
"dev": true | ||
}, | ||
"npmlog": { | ||
"version": "4.1.2", | ||
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", | ||
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", | ||
"dev": true, | ||
"requires": { | ||
"are-we-there-yet": "~1.1.2", | ||
"console-control-strings": "~1.1.0", | ||
"gauge": "~2.7.3", | ||
"set-blocking": "~2.0.0" | ||
} | ||
}, | ||
"number-is-nan": { | ||
"version": "1.0.1", | ||
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", | ||
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", | ||
"dev": true | ||
}, | ||
"object-assign": { | ||
"version": "4.1.1", | ||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", | ||
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", | ||
"dev": true | ||
}, | ||
"once": { | ||
@@ -469,8 +215,2 @@ "version": "1.4.0", | ||
}, | ||
"os-homedir": { | ||
"version": "1.0.2", | ||
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", | ||
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", | ||
"dev": true | ||
}, | ||
"path-is-absolute": { | ||
@@ -482,84 +222,2 @@ "version": "1.0.1", | ||
}, | ||
"prebuild-install": { | ||
"version": "2.5.3", | ||
"resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-2.5.3.tgz", | ||
"integrity": "sha512-/rI36cN2g7vDQnKWN8Uzupi++KjyqS9iS+/fpwG4Ea8d0Pip0PQ5bshUNzVwt+/D2MRfhVAplYMMvWLqWrCF/g==", | ||
"dev": true, | ||
"requires": { | ||
"detect-libc": "^1.0.3", | ||
"expand-template": "^1.0.2", | ||
"github-from-package": "0.0.0", | ||
"minimist": "^1.2.0", | ||
"mkdirp": "^0.5.1", | ||
"node-abi": "^2.2.0", | ||
"noop-logger": "^0.1.1", | ||
"npmlog": "^4.0.1", | ||
"os-homedir": "^1.0.1", | ||
"pump": "^2.0.1", | ||
"rc": "^1.1.6", | ||
"simple-get": "^2.7.0", | ||
"tar-fs": "^1.13.0", | ||
"tunnel-agent": "^0.6.0", | ||
"which-pm-runs": "^1.0.0" | ||
}, | ||
"dependencies": { | ||
"minimist": { | ||
"version": "1.2.0", | ||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", | ||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", | ||
"dev": true | ||
} | ||
} | ||
}, | ||
"process-nextick-args": { | ||
"version": "2.0.0", | ||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", | ||
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", | ||
"dev": true | ||
}, | ||
"pump": { | ||
"version": "2.0.1", | ||
"resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", | ||
"integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", | ||
"dev": true, | ||
"requires": { | ||
"end-of-stream": "^1.1.0", | ||
"once": "^1.3.1" | ||
} | ||
}, | ||
"rc": { | ||
"version": "1.2.6", | ||
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.6.tgz", | ||
"integrity": "sha1-6xiYnG1PTxYsOZ953dKfODVWgJI=", | ||
"dev": true, | ||
"requires": { | ||
"deep-extend": "~0.4.0", | ||
"ini": "~1.3.0", | ||
"minimist": "^1.2.0", | ||
"strip-json-comments": "~2.0.1" | ||
}, | ||
"dependencies": { | ||
"minimist": { | ||
"version": "1.2.0", | ||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", | ||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", | ||
"dev": true | ||
} | ||
} | ||
}, | ||
"readable-stream": { | ||
"version": "2.3.6", | ||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", | ||
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", | ||
"dev": true, | ||
"requires": { | ||
"core-util-is": "~1.0.0", | ||
"inherits": "~2.0.3", | ||
"isarray": "~1.0.0", | ||
"process-nextick-args": "~2.0.0", | ||
"safe-buffer": "~5.1.1", | ||
"string_decoder": "~1.1.1", | ||
"util-deprecate": "~1.0.1" | ||
} | ||
}, | ||
"safe-buffer": { | ||
@@ -571,81 +229,7 @@ "version": "5.1.2", | ||
"sandra": { | ||
"version": "0.3.0", | ||
"resolved": "https://registry.npmjs.org/sandra/-/sandra-0.3.0.tgz", | ||
"integrity": "sha1-AGK3y6Pp/eucOtB161qEslsKOw4=", | ||
"dev": true, | ||
"requires": { | ||
"async": "^2.6.0", | ||
"microtime": "^2.1.7" | ||
} | ||
}, | ||
"semver": { | ||
"version": "5.5.0", | ||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", | ||
"integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", | ||
"version": "0.3.2", | ||
"resolved": "https://registry.npmjs.org/sandra/-/sandra-0.3.2.tgz", | ||
"integrity": "sha1-XzLZMHnKAr+gWevLYAR8SIH1Eb0=", | ||
"dev": true | ||
}, | ||
"set-blocking": { | ||
"version": "2.0.0", | ||
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", | ||
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", | ||
"dev": true | ||
}, | ||
"signal-exit": { | ||
"version": "3.0.2", | ||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", | ||
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", | ||
"dev": true | ||
}, | ||
"simple-concat": { | ||
"version": "1.0.0", | ||
"resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", | ||
"integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", | ||
"dev": true | ||
}, | ||
"simple-get": { | ||
"version": "2.8.1", | ||
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", | ||
"integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", | ||
"dev": true, | ||
"requires": { | ||
"decompress-response": "^3.3.0", | ||
"once": "^1.3.1", | ||
"simple-concat": "^1.0.0" | ||
} | ||
}, | ||
"string-width": { | ||
"version": "1.0.2", | ||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", | ||
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", | ||
"dev": true, | ||
"requires": { | ||
"code-point-at": "^1.0.0", | ||
"is-fullwidth-code-point": "^1.0.0", | ||
"strip-ansi": "^3.0.0" | ||
} | ||
}, | ||
"string_decoder": { | ||
"version": "1.1.1", | ||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", | ||
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", | ||
"dev": true, | ||
"requires": { | ||
"safe-buffer": "~5.1.0" | ||
} | ||
}, | ||
"strip-ansi": { | ||
"version": "3.0.1", | ||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", | ||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", | ||
"dev": true, | ||
"requires": { | ||
"ansi-regex": "^2.0.0" | ||
} | ||
}, | ||
"strip-json-comments": { | ||
"version": "2.0.1", | ||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", | ||
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", | ||
"dev": true | ||
}, | ||
"supports-color": { | ||
@@ -660,56 +244,2 @@ "version": "4.4.0", | ||
}, | ||
"tar-fs": { | ||
"version": "1.16.0", | ||
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.0.tgz", | ||
"integrity": "sha512-I9rb6v7mjWLtOfCau9eH5L7sLJyU2BnxtEZRQ5Mt+eRKmf1F0ohXmT/Jc3fr52kDvjJ/HV5MH3soQfPL5bQ0Yg==", | ||
"dev": true, | ||
"requires": { | ||
"chownr": "^1.0.1", | ||
"mkdirp": "^0.5.1", | ||
"pump": "^1.0.0", | ||
"tar-stream": "^1.1.2" | ||
}, | ||
"dependencies": { | ||
"pump": { | ||
"version": "1.0.3", | ||
"resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", | ||
"integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", | ||
"dev": true, | ||
"requires": { | ||
"end-of-stream": "^1.1.0", | ||
"once": "^1.3.1" | ||
} | ||
} | ||
} | ||
}, | ||
"tar-stream": { | ||
"version": "1.5.7", | ||
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.7.tgz", | ||
"integrity": "sha512-euyxmyeJpl6wjWGnzPfZRQ1IGLNbqEDJWuYyue9sixDY2vfqVBRiIqZLWYhWG5da031WF4qEN9D9Ek9lZHiH1Q==", | ||
"dev": true, | ||
"requires": { | ||
"bl": "^1.0.0", | ||
"buffer-alloc": "^1.1.0", | ||
"end-of-stream": "^1.0.0", | ||
"fs-constants": "^1.0.0", | ||
"readable-stream": "^2.0.0", | ||
"to-buffer": "^1.1.0", | ||
"xtend": "^4.0.0" | ||
} | ||
}, | ||
"to-buffer": { | ||
"version": "1.1.1", | ||
"resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", | ||
"integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", | ||
"dev": true | ||
}, | ||
"tunnel-agent": { | ||
"version": "0.6.0", | ||
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", | ||
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", | ||
"dev": true, | ||
"requires": { | ||
"safe-buffer": "^5.0.1" | ||
} | ||
}, | ||
"typescript": { | ||
@@ -721,23 +251,2 @@ "version": "2.8.3", | ||
}, | ||
"util-deprecate": { | ||
"version": "1.0.2", | ||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", | ||
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", | ||
"dev": true | ||
}, | ||
"which-pm-runs": { | ||
"version": "1.0.0", | ||
"resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", | ||
"integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=", | ||
"dev": true | ||
}, | ||
"wide-align": { | ||
"version": "1.1.2", | ||
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", | ||
"integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", | ||
"dev": true, | ||
"requires": { | ||
"string-width": "^1.0.2" | ||
} | ||
}, | ||
"wrappy": { | ||
@@ -748,10 +257,4 @@ "version": "1.0.2", | ||
"dev": true | ||
}, | ||
"xtend": { | ||
"version": "4.0.1", | ||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", | ||
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", | ||
"dev": true | ||
} | ||
} | ||
} |
{ | ||
"name": "argon2", | ||
"version": "0.19.2", | ||
"version": "0.19.3", | ||
"description": "An Argon2 library for Node", | ||
@@ -40,3 +40,3 @@ "main": "argon2.js", | ||
"mocha": "^5.1.1", | ||
"sandra": "^0.3.0", | ||
"sandra": "^0.3.2", | ||
"typescript": "^2.8.3" | ||
@@ -43,0 +43,0 @@ }, |
@@ -87,6 +87,6 @@ # node-argon2 | ||
as the third parameter, with keys `timeCost`, `memoryCost` and `parallelism`, | ||
respectively defaulted to 3, 12 (meaning 2^12 KiB) and 1 (threads): | ||
respectively defaulted to 3, 4096 (KiB) and 1 (threads): | ||
```js | ||
const options = { | ||
timeCost: 4, memoryCost: 13, parallelism: 2, type: argon2.argon2d | ||
timeCost: 4, memoryCost: 2 ** 13, parallelism: 2, type: argon2.argon2d | ||
}; | ||
@@ -106,3 +106,3 @@ | ||
console.log(argon2.defaults); | ||
// => { timeCost: 3, memoryCost: 12, parallelism: 1, type: argon2.argon2i } | ||
// => { timeCost: 3, memoryCost: 4096, parallelism: 1, type: argon2.argon2i } | ||
``` | ||
@@ -109,0 +109,0 @@ |
const assert = require('assert') | ||
const argon2 = require('../argon2') | ||
const {defaults, limits} = argon2 | ||
const {argon2i, argon2d, argon2id, defaults, limits} = argon2 | ||
const password = 'password' | ||
@@ -24,6 +24,7 @@ const salt = Buffer.alloc(16, 'salt') | ||
hashLength: 32, | ||
saltLength: 16, | ||
timeCost: 3, | ||
memoryCost: 1 << 12, | ||
parallelism: 1, | ||
type: argon2.argon2i, | ||
type: argon2i, | ||
version: 0x13 | ||
@@ -47,3 +48,3 @@ }, defaults) | ||
it('hash with argon2d', () => { | ||
return argon2.hash(password, {type: argon2.argon2d, salt}).then(hash => { | ||
return argon2.hash(password, {type: argon2d, salt}).then(hash => { | ||
assert.strictEqual(hashes.argon2d, hash) | ||
@@ -54,3 +55,3 @@ }) | ||
it('argon2d with raw hash', () => { | ||
return argon2.hash(password, {type: argon2.argon2d, raw: true, salt}).then(hash => { | ||
return argon2.hash(password, {type: argon2d, raw: true, salt}).then(hash => { | ||
assert(hashes.rawArgon2d.equals(hash)) | ||
@@ -61,3 +62,3 @@ }) | ||
it('hash with argon2id', () => { | ||
return argon2.hash(password, {type: argon2.argon2id, salt}).then(hash => { | ||
return argon2.hash(password, {type: argon2id, salt}).then(hash => { | ||
assert.strictEqual(hashes.argon2id, hash) | ||
@@ -68,3 +69,3 @@ }) | ||
it('argon2id with raw hash', () => { | ||
return argon2.hash(password, {type: argon2.argon2id, raw: true, salt}).then(hash => { | ||
return argon2.hash(password, {type: argon2id, raw: true, salt}).then(hash => { | ||
assert(hashes.rawArgon2id.equals(hash)) | ||
@@ -218,3 +219,3 @@ }) | ||
it('verify argon2d correct password', () => { | ||
return argon2.hash(password, {type: argon2.argon2d}).then(hash => { | ||
return argon2.hash(password, {type: argon2d}).then(hash => { | ||
return argon2.verify(hash, password).then(matches => { | ||
@@ -227,3 +228,3 @@ assert(matches) | ||
it('verify argon2d wrong password', () => { | ||
return argon2.hash(password, {type: argon2.argon2d}).then(hash => { | ||
return argon2.hash(password, {type: argon2d}).then(hash => { | ||
return argon2.verify(hash, 'passworld').then(matches => { | ||
@@ -236,3 +237,3 @@ assert(!matches) | ||
it('verify argon2id correct password', () => { | ||
return argon2.hash(password, {type: argon2.argon2id}).then(hash => { | ||
return argon2.hash(password, {type: argon2id}).then(hash => { | ||
return argon2.verify(hash, password).then(matches => { | ||
@@ -245,3 +246,3 @@ assert(matches) | ||
it('verify argon2id wrong password', () => { | ||
return argon2.hash(password, {type: argon2.argon2id}).then(hash => { | ||
return argon2.hash(password, {type: argon2id}).then(hash => { | ||
return argon2.verify(hash, 'passworld').then(matches => { | ||
@@ -248,0 +249,0 @@ assert(!matches) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 11 instances in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1
212563
28
598