New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

argon2-pass

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

argon2-pass - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

9

CHANGELOG.md
# 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).
## [0.2.1] - 2018-09-09
### Removed
- Removed development console.log calls from the module, these were left in after testing the changes to `static readonly` values.
## [0.2.0] - 2018-09-08

@@ -51,5 +56,7 @@ ### Added

<!-- Links -->
[Unreleased]: https://github.com/DrBarnabus/secure-pass/compare/v0.1.3...HEAD
[Unreleased]: https://github.com/DrBarnabus/secure-pass/compare/v0.2.1...HEAD
[0.2.1]: https://github.com/DrBarnabus/secure-pass/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/DrBarnabus/secure-pass/compare/v0.1.3...v0.2.0
[0.1.3]: https://github.com/DrBarnabus/secure-pass/compare/v0.1.2...v0.1.3
[0.1.2]: https://github.com/DrBarnabus/secure-pass/compare/v0.1.1...v0.1.2
[0.1.1]: https://github.com/DrBarnabus/secure-pass/compare/v0.1.0...v0.1.1

@@ -28,2 +28,8 @@ "use strict";

});
test('MacBytes Constant should be defined.', () => {
expect(__1.SecurePass.MacBytes).toBeDefined();
});
test('KeyBytes Constant should be defined.', () => {
expect(__1.SecurePass.KeyBytes).toBeDefined();
});
test('MemLimit* Constants should be defined.', () => {

@@ -30,0 +36,0 @@ expect(__1.SecurePass.MemLimitDefault).toBeDefined();

@@ -72,3 +72,11 @@ /**

static readonly SaltBytes: number;
/**
* Length of the Mac buffer returned by generateOneTimeAuth.
* @readonly
*/
static readonly MacBytes: number;
/**
* Length of the secret Key buffer returned by generateOneTimeAuth and generateOneTimeAuthCode.
* @readonly
*/
static readonly KeyBytes: number;

@@ -75,0 +83,0 @@ /**

28

dist/index.js

@@ -81,4 +81,4 @@ "use strict";

static generateOneTimeAuth(message) {
const mac = Buffer.alloc(sodium_native_1.default.crypto_onetimeauth_BYTES);
const key = Buffer.alloc(sodium_native_1.default.crypto_onetimeauth_KEYBYTES);
const mac = Buffer.alloc(SecurePass.MacBytes);
const key = Buffer.alloc(SecurePass.KeyBytes);
sodium_native_1.default.randombytes_buf(key);

@@ -167,3 +167,3 @@ sodium_native_1.default.crypto_onetimeauth(mac, message, key);

hashPasswordSync(password) {
if (!(password.length > SecurePass.PasswordBytesMin && password.length < SecurePass.PasswordBytesMax)) {
if (!(password.length >= SecurePass.PasswordBytesMin && password.length < SecurePass.PasswordBytesMax)) {
throw new error_1.SecurePassError(`Length of Password Buffer must be between ${SecurePass.PasswordBytesMin} and ${SecurePass.PasswordBytesMax}`);

@@ -190,3 +190,3 @@ }

verifyHashSync(password, hash) {
if (!(password.length > SecurePass.PasswordBytesMin && password.length < SecurePass.PasswordBytesMax)) {
if (!(password.length >= SecurePass.PasswordBytesMin && password.length < SecurePass.PasswordBytesMax)) {
throw new error_1.SecurePassError(`Length of Password Buffer must be between ${SecurePass.PasswordBytesMin} and ${SecurePass.PasswordBytesMax}`);

@@ -211,3 +211,3 @@ }

return new Promise((resolve, reject) => {
if (!(password.length > SecurePass.PasswordBytesMin && password.length < SecurePass.PasswordBytesMax)) {
if (!(password.length >= SecurePass.PasswordBytesMin && password.length < SecurePass.PasswordBytesMax)) {
reject(new error_1.SecurePassError(`Length of Password Buffer must be between ${SecurePass.PasswordBytesMin} and ${SecurePass.PasswordBytesMax}`));

@@ -231,3 +231,3 @@ }

return new Promise((resolve, reject) => {
if (!(password.length > SecurePass.PasswordBytesMin && password.length < SecurePass.PasswordBytesMax)) {
if (!(password.length >= SecurePass.PasswordBytesMin && password.length < SecurePass.PasswordBytesMax)) {
reject(new error_1.SecurePassError(`Length of Password Buffer must be between ${SecurePass.PasswordBytesMin} and ${SecurePass.PasswordBytesMax}`));

@@ -265,3 +265,3 @@ }

*/
SecurePass.PasswordBytesMin = 0;
SecurePass.PasswordBytesMin = 1;
/**

@@ -282,5 +282,13 @@ * Maxium Length for the Password input buffer.

SecurePass.SaltBytes = 16;
SecurePass.MacBytes = sodium_native_1.default.crypto_onetimeauth_BYTES;
SecurePass.KeyBytes = sodium_native_1.default.crypto_onetimeauth_KEYBYTES;
/**
* Length of the Mac buffer returned by generateOneTimeAuth.
* @readonly
*/
SecurePass.MacBytes = 16;
/**
* Length of the secret Key buffer returned by generateOneTimeAuth and generateOneTimeAuthCode.
* @readonly
*/
SecurePass.KeyBytes = 32;
/**
* Default Memory Limit. 64MB.

@@ -363,4 +371,2 @@ * @readonly

exports.default = SecurePass;
console.log(SecurePass.MacBytes);
console.log(SecurePass.KeyBytes);
//# sourceMappingURL=index.js.map
{
"name": "argon2-pass",
"version": "0.2.0",
"version": "0.2.1",
"description": "State of the art password hashing and one time password reset token generation module written in TypeScript for nodejs.",

@@ -12,3 +12,3 @@ "main": "./dist/index.js",

"build": "tsc",
"prepublishonly": "yarn build"
"prepare": "yarn build"
},

@@ -66,4 +66,14 @@ "dependencies": {

"token",
"typescript"
"typescript",
"argon2 password",
"secure password",
"argon2id password",
"password hasing",
"password hasher",
"password security",
"one time authentication",
"one time authentication code",
"one time key",
"cryptography"
]
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc