mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-18 01:36:08 +08:00
8 lines
233 B
TypeScript
8 lines
233 B
TypeScript
import crypto from 'crypto';
|
|
|
|
export default function hash(password: string, salt: string) {
|
|
return crypto.pbkdf2Sync(password, salt, 100000, 64, 'sha256').toString('hex').substr(0, 64);
|
|
}
|
|
|
|
global.Hydro.lib['hash.hydro'] = hash;
|