Nodejs crypto vs python hashlib
问题 I'm trying to make a python function and a nodejs function compute the same hash. However, it seems like the binary that is outputted is different between nodejs crypto and python hashlib. The python I'm using is: hash = hashlib.sha512() hash.update(salt) hash.update(password.encode('utf8')) hash.digest() The node/coffeescript is: crypto.createHash('sha512').update(salt, 'binary').update(password, 'utf8').digest() These lines should produce the same result, but for some reason they don't.