I want to hash a string, but I don't want to implement the hashing algorithm. Is there a built-in JavaScript function or a dependable npm package to hash strings? If so, how do I use it to hash a string?
For example, if I have
const string = "password";
I want to run it through some kind of ready-made function or method, like this
const hash = hashFunction( string );
then get a hash from it, like this
console.log( hash ); //5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8
NOTE: I'm aware that this question is similar to this question, but the chosen answer there implements hashing. I'm specifically looking for ready-built dependable functions or methods that hash.