You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
233 B
TypeScript
8 lines
233 B
TypeScript
4 years ago
|
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;
|