Use faster bcrypt implementation (#1593)

This commit is contained in:
LongYinan 2021-04-14 00:26:25 +08:00 committed by GitHub
parent dd445dafaa
commit 8ed1099795
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -55,7 +55,6 @@
"devDependencies": { "devDependencies": {
"@oclif/dev-cli": "^1.22.2", "@oclif/dev-cli": "^1.22.2",
"@types/basic-auth": "^1.1.2", "@types/basic-auth": "^1.1.2",
"@types/bcryptjs": "^2.4.1",
"@types/bull": "^3.3.10", "@types/bull": "^3.3.10",
"@types/compression": "1.0.1", "@types/compression": "1.0.1",
"@types/connect-history-api-fallback": "^1.3.1", "@types/connect-history-api-fallback": "^1.3.1",
@ -80,11 +79,11 @@
"typescript": "~3.9.7" "typescript": "~3.9.7"
}, },
"dependencies": { "dependencies": {
"@node-rs/bcrypt": "^1.2.0",
"@oclif/command": "^1.5.18", "@oclif/command": "^1.5.18",
"@oclif/errors": "^1.2.2", "@oclif/errors": "^1.2.2",
"@types/jsonwebtoken": "^8.3.4", "@types/jsonwebtoken": "^8.3.4",
"basic-auth": "^2.0.1", "basic-auth": "^2.0.1",
"bcryptjs": "^2.4.3",
"body-parser": "^1.18.3", "body-parser": "^1.18.3",
"body-parser-xml": "^1.1.0", "body-parser-xml": "^1.1.0",
"bull": "^3.19.0", "bull": "^3.19.0",
@ -135,4 +134,4 @@
"json" "json"
] ]
} }
} }

View file

@ -22,7 +22,7 @@ import { RequestOptions } from 'oauth-1.0a';
import * as csrf from 'csrf'; import * as csrf from 'csrf';
import * as requestPromise from 'request-promise-native'; import * as requestPromise from 'request-promise-native';
import { createHmac } from 'crypto'; import { createHmac } from 'crypto';
import { compare } from 'bcryptjs'; import { compare } from '@node-rs/bcrypt';
import * as promClient from 'prom-client'; import * as promClient from 'prom-client';
import { import {