Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

scrypt-async-modern

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scrypt-async-modern - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

.travis.yml

68

package.json
{
"name": "scrypt-async-modern",
"version": "3.0.1",
"description": "Fast \"async\" scrypt implementation in modern JavaScript.",
"main": "dist/cjs/index.js",
"module": "dist/es/index.js",
"jsnext:main": "dist/es/index.js",
"scripts": {
"test": "jest",
"build": "rollup -c",
"prettier": "prettier --write src/**/*.js"
},
"devDependencies": {
"@babel/core": "^7.0.0-beta.38",
"babel-core": "^7.0.0-0",
"@babel/preset-env": "^7.0.0-beta.38",
"jest": "^22.1.4",
"babel-jest": "^22.1.0",
"rollup": "^0.55.1",
"rollup-plugin-babel": "^4.0.0-beta.0",
"prettier": "^1.10.2"
},
"repository": {
"type": "git",
"url": "https://github.com/Cretezy/scrypt-async-modern.git"
},
"keywords": [
"crypto",
"cryptography",
"scrypt",
"password"
],
"author": "Charles Crete <charles@cretezy.com",
"license": "MIT",
"bugs": {
"url": "https://github.com/Cretezy/scrypt-async-modern/issues"
},
"homepage": "https://github.com/Cretezy/scrypt-async-modern"
"name": "scrypt-async-modern",
"version": "3.0.2",
"description": "Fast \"async\" scrypt implementation in modern JavaScript.",
"main": "dist/index.js",
"scripts": {
"watch": "noderize-scripts watch",
"build": "noderize-scripts build",
"start": "noderize-scripts start",
"format": "noderize-scripts format",
"test": "noderize-scripts test",
"clean": "noderize-scripts clean",
"prepack":
"noderize-scripts clean && noderize-scripts build --env production"
},
"devDependencies": {
"noderize-scripts": "^0.3.2"
},
"repository": {
"type": "git",
"url": "https://github.com/Cretezy/scrypt-async-modern.git"
},
"keywords": ["crypto", "cryptography", "scrypt", "password"],
"author": "Charles Crete <charles@cretezy.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/Cretezy/scrypt-async-modern/issues"
},
"homepage": "https://github.com/Cretezy/scrypt-async-modern",
"prettier": {
"useTabs": true
}
}

@@ -38,7 +38,16 @@ /*!

*/
export default function scrypt(password,
salt,
{ N = 16384, logN, r = 8, p = 1, dkLen = 32, interruptStep = 0, encoding } = {}) {
export default function scrypt(
password,
salt,
{
N = 16384,
logN,
r = 8,
p = 1,
dkLen = 32,
interruptStep = 0,
encoding
} = {}
) {
return new Promise((resolve, reject) => {
if (!logN && !N) {

@@ -66,3 +75,3 @@ return reject(new Error("scrypt: missing N or logN parameter"));

if (r <= 0) {
if (r < 1) {
return reject(new Error("scrypt: invalid r"));

@@ -76,3 +85,6 @@ }

// Internal scrypt function
function run({password, salt, N, r, p, dkLen, interruptStep, encoding }, callback) {
function run(
{ password, salt, N, r, p, dkLen, interruptStep, encoding },
callback
) {
function SHA256(m) {

@@ -642,3 +654,3 @@ const K = [

(function performStep() {
nextTick(function () {
nextTick(function() {
fn(start, start + step < end ? start + step : end);

@@ -645,0 +657,0 @@ start += step;

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