var crypto = require('crypto');

export const HashPassword: React.FC = (password:string, salt:string, callback: () => void) => {
    crypto.pbkdf2(password, this.salt, 1000, 32, function(err, buff) {
        if (err) return cb(err);
        cb(null, buff.toString('hex'));
      });
    crypto.pbkdf2(password, salt, 100000, 64, 'sha512', (err: string, derivedKey: string) => {
        if (err) throw err;
        // Printing the derived key
        callback(derivedKey.toString('hex'));
     });
}