Comparing version 0.19.1 to 0.19.2
@@ -26,3 +26,3 @@ 'use strict' | ||
return new Promise((resolve, reject) => { | ||
for (let key of Object.keys(limits)) { | ||
for (const key of Object.keys(limits)) { | ||
const {max, min} = limits[key] | ||
@@ -95,3 +95,3 @@ const value = options[key] | ||
type: module.exports[type], | ||
version: +version, | ||
version: version ? +version : 0x10, | ||
hashLength: hash.length, | ||
@@ -110,5 +110,3 @@ memoryCost: +memoryCost, | ||
}) | ||
}).then(expected => { | ||
return expected.equals(hash) | ||
}) | ||
}).then(expected => expected.equals(hash)) | ||
} | ||
@@ -115,0 +113,0 @@ |
{ | ||
"name": "argon2", | ||
"version": "0.19.1", | ||
"version": "0.19.2", | ||
"description": "An Argon2 library for Node", | ||
@@ -38,6 +38,6 @@ "main": "argon2.js", | ||
"devDependencies": { | ||
"@types/node": "^10.0.3", | ||
"@types/node": "^10.0.8", | ||
"mocha": "^5.1.1", | ||
"sandra": "^0.3.0", | ||
"typescript": "^2.1.5" | ||
"typescript": "^2.8.3" | ||
}, | ||
@@ -44,0 +44,0 @@ "engines": { |
@@ -16,3 +16,4 @@ const assert = require('assert') | ||
rawArgon2d: Buffer.from('dc261a0e8a1b15aa6b0f4d874cc55544bb2b4a026364ae509aa6169d60c4025c', 'hex'), | ||
rawArgon2id: Buffer.from('7f16c555d3c63d0d4d268cbcec269369bcab5ce2997a967d486045c0f90f276f', 'hex') | ||
rawArgon2id: Buffer.from('7f16c555d3c63d0d4d268cbcec269369bcab5ce2997a967d486045c0f90f276f', 'hex'), | ||
oldFormat: '$argon2i$m=4096,t=3,p=1$tbagT6b1YH33niCo9lVzuA$htv/k+OqWk1V9zD9k5DOBi2kcfcZ6Xu3tWmwEPV3/nc' | ||
}) | ||
@@ -243,3 +244,10 @@ | ||
}) | ||
it('verify old hash format', () => { | ||
// older hashes did not contain the v (version) parameter | ||
return argon2.verify(hashes.oldFormat, 'password').then(matches => { | ||
assert(matches) | ||
}) | ||
}) | ||
}) | ||
}) |
Sorry, the diff of this file is too big to display
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
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
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
598680
55
1092
2