chore: replace bcrypt with @node-rs/bcrypt (#6794)

This commit is contained in:
LongYinan
2020-07-13 23:08:01 +08:00
committed by GitHub
parent 0abe9bb42d
commit ebb0727793
3 changed files with 44 additions and 226 deletions

View File

@@ -3,7 +3,11 @@
var bcrypt = require('bcryptjs');
try {
bcrypt = require('bcrypt');
const _bcrypt = require('@node-rs/bcrypt');
bcrypt = {
hash: _bcrypt.hash,
compare: _bcrypt.verify,
};
} catch (e) {
/* */
}