Hey there, I've been attempting to hash a key using the bcrypt npm package but have encountered some errors. Here's the code I've tried so far:
import * as bcrypt from 'bcrypt';
export class LowLevelEncryption {
encrypt(key: string){
console.log(bcrypt);
bcrypt.hash(key, 19, function(err, hash) {
Store hash in your password DB.
});
}
}
I'm getting an error that looks like this:
Module not found: Error: Can't resolve 'tls' in '/home/ec2-user/environment/passcript/node_modules/tunnel-agent'
If anyone can offer assistance or knows of another library that may work better, I would greatly appreciate it. Thanks!