-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Run in Node.js & Deno - Strings accepted for passphrase & key arguments - Use Web Crypto API in place of node:crypto (except OpenSSL scrypt, timingSafeEqual) - Use GitHub Actions CI in place of Travis CI
- Loading branch information
1 parent
e1531ee
commit cd42554
Showing
12 changed files
with
598 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Scrypt.js GitHub Actions Node.js CI workflow | ||
|
||
name: Node.js CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
node-version: [ 'lts/*', current ] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm install | ||
- run: npm run test-node |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import eslintjs from '@eslint/js'; | ||
import globals from 'globals'; | ||
|
||
export default [ | ||
eslintjs.configs.recommended, | ||
{ ignores: [ 'tmp/' ] }, // github.com/eslint/eslint/discussions/18304 | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
Deno: 'readonly', | ||
}, | ||
}, | ||
rules: { | ||
'array-bracket-spacing': [ 'error', 'always' ], | ||
'comma-dangle': [ 'error', 'always-multiline' ], | ||
'comma-spacing': [ 'error' ], | ||
'curly': [ 'error', 'multi-line' ], | ||
'indent': [ 'error', 4, { 'SwitchCase': 1 } ], | ||
'key-spacing': [ 'error', { 'align': 'value' } ], | ||
'keyword-spacing': [ 'error' ], | ||
'no-case-declarations': 'warn', | ||
'no-console': [ 'warn', { 'allow': [ 'error', 'info', 'debug' ] } ], | ||
'no-irregular-whitespace': 'warn', | ||
'no-redeclare': 'warn', | ||
'no-shadow': 'warn', | ||
'no-unused-vars': 'warn', | ||
'no-var': 'error', | ||
'object-curly-spacing': [ 'error', 'always' ], | ||
'prefer-const': 'error', | ||
'quotes': [ 'error', 'single', 'avoid-escape' ], | ||
'require-await': 'error', | ||
'semi': [ 'error', 'always' ], | ||
'space-before-blocks': [ 'error', 'always' ], | ||
'space-in-parens': [ 'error' ], | ||
'strict': [ 'error', 'global' ], | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,33 @@ | ||
{ | ||
"name": "scrypt-kdf", | ||
"description": "Scrypt Key Derivation Function", | ||
"keywords": [ | ||
"crypto", | ||
"scrypt", | ||
"kdf", | ||
"password", | ||
"hash", | ||
"login", | ||
"authenticate", | ||
"verify" | ||
], | ||
"keywords": [ "crypto", "scrypt", "kdf", "password", "hash", "login", "authenticate", "verify" ], | ||
"author": "Chris Veness", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/chrisveness/scrypt-kdf" | ||
}, | ||
"version": "2.0.1", | ||
"version": "3.0.0", | ||
"license": "MIT", | ||
"main": "scrypt.js", | ||
"type": "module", | ||
"types": "scrypt.d.ts", | ||
"engines": { | ||
"node": ">=8.5.0" | ||
"node": ">=18.0.0" | ||
}, | ||
"scripts": { | ||
"test": "mocha --exit test/scrypt-tests.js", | ||
"lint": "eslint scrypt.js test/scrypt-tests.js", | ||
"cover": "c8 -r html npm test" | ||
"test": "npm run test-node && npm run test-deno", | ||
"test-node": "node --test test/tests-node.js", | ||
"test-deno": "deno test -NES test/tests-deno.js", | ||
"lint": "eslint scrypt.js test/tests-*.js", | ||
"cover": "c8 npm test" | ||
}, | ||
"devDependencies": { | ||
"c8": "^7.0.0", | ||
"chai": "^4.0.0", | ||
"coveralls": "^3.0.0", | ||
"eslint": "^7.0.0", | ||
"mocha": "^7.0.0" | ||
}, | ||
"eslintConfig": { | ||
"env": { | ||
"es2017": true, | ||
"mocha": true, | ||
"node": true | ||
}, | ||
"extends": "eslint:recommended" | ||
"@babel/eslint-parser": "^7", | ||
"@babel/plugin-syntax-import-attributes": "^7", | ||
"@eslint/js": "^9", | ||
"@types/node": "^22", | ||
"c8": "^10", | ||
"globals": "^15" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.