argon2-pass
Advanced tools
Comparing version 1.0.1 to 1.0.2
# Changelog | ||
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
## [1.0.0] - 2018-12-12 | ||
## [1.0.2] - 2019-08-02 | ||
Updated package dependencies and re-released. | ||
## [1.0.1] - 2018-12-12 | ||
Updated package dependencies and re-released. | ||
## [1.0.0] - 2018-09-19 | ||
@@ -74,3 +78,4 @@ | ||
<!-- Links --> | ||
[Unreleased]: https://github.com/DrBarnabus/secure-pass/compare/v1.0.0...HEAD | ||
[1.0.2]: https://github.com/DrBarnabus/secure-pass/compare/v1.0.1...v1.0.2 | ||
[1.0.1]: https://github.com/DrBarnabus/secure-pass/compare/v1.0.0...v1.0.1 | ||
[1.0.0]: https://github.com/DrBarnabus/secure-pass/compare/v0.2.1...v1.0.0 | ||
@@ -77,0 +82,0 @@ [0.2.1]: https://github.com/DrBarnabus/secure-pass/compare/v0.2.0...v0.2.1 |
@@ -280,3 +280,3 @@ "use strict"; | ||
// Removed password bytes max as it was killing travis. | ||
test.each([__1.SecurePass.PasswordBytesMin])('Should return a hash if given a password buffer of length %i.', (p, done) => __awaiter(this, void 0, void 0, function* () { | ||
test.each([__1.SecurePass.PasswordBytesMin])('Should return a hash if given a password buffer of length %i.', (p) => __awaiter(this, void 0, void 0, function* () { | ||
const sp = new __1.SecurePass(); | ||
@@ -287,5 +287,4 @@ const password = Buffer.alloc(p, 'f'); | ||
expect(hash.indexOf('$argon2id')).toEqual(0); | ||
done(); | ||
})); | ||
test.each([__1.SecurePass.PasswordBytesMin - 1, __1.SecurePass.PasswordBytesMax + 1])('Should throw an error if given a password buffer of length %i.', (p, done) => __awaiter(this, void 0, void 0, function* () { | ||
test.each([__1.SecurePass.PasswordBytesMin - 1, __1.SecurePass.PasswordBytesMax + 1])('Should throw an error if given a password buffer of length %i.', (p) => __awaiter(this, void 0, void 0, function* () { | ||
try { | ||
@@ -296,7 +295,5 @@ const sp = new __1.SecurePass(); | ||
expect(false).toBeTruthy(); | ||
done(); | ||
} | ||
catch (e) { | ||
expect(e).toBeDefined(); | ||
done(); | ||
} | ||
@@ -320,3 +317,3 @@ })); | ||
// Removed Maximum Check, as it was killing Travis. | ||
test.each([__1.SecurePass.PasswordBytesMin])('Should return a hash if given a password buffer of length %i.', (p, done) => __awaiter(this, void 0, void 0, function* () { | ||
test.each([__1.SecurePass.PasswordBytesMin])('Should return a hash if given a password buffer of length %i.', (p) => __awaiter(this, void 0, void 0, function* () { | ||
const sp = new __1.SecurePass(); | ||
@@ -331,6 +328,5 @@ const password = Buffer.alloc(p, 'f'); | ||
expect(hash.indexOf('$argon2id')).toEqual(0); | ||
done(); | ||
}); | ||
})); | ||
test.each([__1.SecurePass.PasswordBytesMin - 1, __1.SecurePass.PasswordBytesMax + 1])('Should throw an error if given a password buffer of length %i.', (p, done) => __awaiter(this, void 0, void 0, function* () { | ||
test.each([__1.SecurePass.PasswordBytesMin - 1, __1.SecurePass.PasswordBytesMax + 1])('Should throw an error if given a password buffer of length %i.', (p) => __awaiter(this, void 0, void 0, function* () { | ||
const sp = new __1.SecurePass(); | ||
@@ -342,3 +338,2 @@ try { | ||
expect(hash).toBeUndefined(); | ||
done(); | ||
}); | ||
@@ -348,3 +343,2 @@ } | ||
expect(e).toBeDefined(); | ||
done(); | ||
} | ||
@@ -363,3 +357,3 @@ })); | ||
// Removed password bytes max as it was killing travis. | ||
test.each([__1.SecurePass.PasswordBytesMin])('Should return a hash if given a password buffer of length %1.', (p, done) => { | ||
test.each([__1.SecurePass.PasswordBytesMin])('Should return a hash if given a password buffer of length %1.', (p) => { | ||
const sp = new __1.SecurePass(); | ||
@@ -370,5 +364,4 @@ const password = Buffer.alloc(p, 'f'); | ||
expect(hash.indexOf('$argon2id')).toEqual(0); | ||
done(); | ||
}); | ||
test.each([__1.SecurePass.PasswordBytesMin - 1, __1.SecurePass.PasswordBytesMax + 1])('Should throw an error if given a password buffer of length %i.', (p, done) => { | ||
test.each([__1.SecurePass.PasswordBytesMin - 1, __1.SecurePass.PasswordBytesMax + 1])('Should throw an error if given a password buffer of length %i.', (p) => { | ||
try { | ||
@@ -379,7 +372,5 @@ const sp = new __1.SecurePass(); | ||
expect(false).toBeTruthy(); | ||
done(); | ||
} | ||
catch (e) { | ||
expect(e).toBeDefined(); | ||
done(); | ||
} | ||
@@ -386,0 +377,0 @@ }); |
{ | ||
"name": "argon2-pass", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "State of the art password hashing and one time password reset token generation module written in TypeScript for nodejs.", | ||
@@ -16,13 +16,13 @@ "main": "./dist/index.js", | ||
"dependencies": { | ||
"sodium-native": "^2.2.3" | ||
"sodium-native": "^2.4.3" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^23.3.10", | ||
"@types/supertest": "^2.0.7", | ||
"jest": "^23.6.0", | ||
"ts-jest": "^23.10.5", | ||
"tslint": "^5.11.0", | ||
"typedoc": "^0.13.0", | ||
"typedoc-plugin-external-module-name": "^1.1.3", | ||
"typescript": "^3.2.2" | ||
"@types/jest": "^24.0.16", | ||
"@types/supertest": "^2.0.8", | ||
"jest": "^24.8.0", | ||
"ts-jest": "^24.0.2", | ||
"tslint": "^5.18.0", | ||
"typedoc": "^0.15.0", | ||
"typedoc-plugin-external-module-name": "^2.1.0", | ||
"typescript": "^3.5.3" | ||
}, | ||
@@ -29,0 +29,0 @@ "jest": { |
@@ -70,3 +70,3 @@ import sodium from 'sodium-native'; | ||
])('isInvalidOrUnrecognized should return the correct result when called with %i.', (vr, b) => { | ||
expect(SecurePass.isInvalidOrUnrecognized(vr)).toEqual(b); | ||
expect(SecurePass.isInvalidOrUnrecognized(vr as VerificationResult)).toEqual(b); | ||
}); | ||
@@ -80,3 +80,3 @@ | ||
])('isInvalid should return the correct result when called with %i.', (vr, b) => { | ||
expect(SecurePass.isInvalid(vr)).toEqual(b); | ||
expect(SecurePass.isInvalid(vr as VerificationResult)).toEqual(b); | ||
}); | ||
@@ -90,3 +90,3 @@ | ||
])('isValid should return the correct result when called with %i.', (vr, b) => { | ||
expect(SecurePass.isValid(vr)).toEqual(b); | ||
expect(SecurePass.isValid(vr as VerificationResult)).toEqual(b); | ||
}); | ||
@@ -100,3 +100,3 @@ | ||
])('isValidNeedsRehash should return the correct result when called with %i.', (vr, b) => { | ||
expect(SecurePass.isValidNeedsRehash(vr)).toEqual(b); | ||
expect(SecurePass.isValidNeedsRehash(vr as VerificationResult)).toEqual(b); | ||
}); | ||
@@ -338,3 +338,3 @@ }); | ||
'Should return a hash if given a password buffer of length %i.', | ||
async (p, done) => { | ||
async (p) => { | ||
const sp = new SecurePass(); | ||
@@ -346,4 +346,2 @@ const password = Buffer.alloc(p, 'f'); | ||
expect(hash.indexOf('$argon2id')).toEqual(0); | ||
done(); | ||
} | ||
@@ -354,3 +352,3 @@ ); | ||
'Should throw an error if given a password buffer of length %i.', | ||
async (p, done) => { | ||
async (p) => { | ||
try { | ||
@@ -362,6 +360,4 @@ const sp = new SecurePass(); | ||
expect(false).toBeTruthy(); | ||
done(); | ||
} catch (e) { | ||
expect(e).toBeDefined(); | ||
done(); | ||
} | ||
@@ -393,3 +389,3 @@ } | ||
'Should return a hash if given a password buffer of length %i.', | ||
async (p, done) => { | ||
async (p) => { | ||
const sp = new SecurePass(); | ||
@@ -405,4 +401,2 @@ const password = Buffer.alloc(p, 'f'); | ||
expect(hash.indexOf('$argon2id')).toEqual(0); | ||
done(); | ||
}); | ||
@@ -414,3 +408,3 @@ } | ||
'Should throw an error if given a password buffer of length %i.', | ||
async (p, done) => { | ||
async (p) => { | ||
const sp = new SecurePass(); | ||
@@ -424,8 +418,5 @@ | ||
expect(hash).toBeUndefined(); | ||
done(); | ||
}); | ||
} catch (e) { | ||
expect(e).toBeDefined(); | ||
done(); | ||
} | ||
@@ -452,3 +443,3 @@ } | ||
'Should return a hash if given a password buffer of length %1.', | ||
(p, done) => { | ||
(p) => { | ||
const sp = new SecurePass(); | ||
@@ -460,4 +451,2 @@ const password = Buffer.alloc(p, 'f'); | ||
expect(hash.indexOf('$argon2id')).toEqual(0); | ||
done(); | ||
} | ||
@@ -468,3 +457,3 @@ ); | ||
'Should throw an error if given a password buffer of length %i.', | ||
(p, done) => { | ||
(p) => { | ||
try { | ||
@@ -476,6 +465,4 @@ const sp = new SecurePass(); | ||
expect(false).toBeTruthy(); | ||
done(); | ||
} catch (e) { | ||
expect(e).toBeDefined(); | ||
done(); | ||
} | ||
@@ -482,0 +469,0 @@ } |
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
656947
3771
Updatedsodium-native@^2.4.3