Best practice for hashing passwords – SHA256 or SHA512?

Switching to SHA512 will hardly make your website more secure. You should not write your own password hashing function. Instead, use an existing implementation. SHA256 and SHA512 are message digests, they were never meant to be password-hashing (or key-derivation) functions. (Although a message digest could be used a building block for a KDF, such as … Read more

node.js hash string?

If you just want to md5 hash a simple string I found this works for me. var crypto = require(‘crypto’); var name=”braitsch”; var hash = crypto.createHash(‘md5’).update(name).digest(‘hex’); console.log(hash); // 9b74c9897bac770ffc029102a200c5de