var crypto = require('crypto');

export const hashPassword: React.FC = (password:string, salt:string, 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;