mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
在worker中执行命令
This commit is contained in:
1 parent
5db23edebb
commit
f293e1f59e
4 files changed
+27
-18
No files matched your search
@@ -1,12 +1,7 @@
|
||||
const crypto = require('crypto');
|
||||
|
||||
/**
|
||||
* @param {string} password
|
||||
* @param {string} salt
|
||||
*/
|
||||
function hash(password, salt) {
|
||||
const res = crypto.pbkdf2Sync(password, salt, 100000, 64, 'sha256');
|
||||
return res.toString('Hex');
|
||||
return crypto.pbkdf2Sync(password, salt, 100000, 64, 'sha256').toString('hex');
|
||||
}
|
||||
|
||||
global.Hydro.lib['hash.hydro'] = module.exports = hash;
|
||||
Reference in new issue
Block a user