You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
pizza.krasnikov.pro/.history/components/admin/function/hashPassword_20220520142548.ts

10 lines
354 B

var crypto = require('crypto');
export const hashPassword: React.FC = (password:string, salt:string, callback:callback) => {
crypto.pbkdf2(password, salt, 100000, 64, 'sha512', (err, derivedKey) => {
if (err) throw err;
// Printing the derived key
callback(derivedKey.toString('hex'));
});
}
export default hashPassword;