02/26/2018, 11:52 AM
hey all, just a quick one (i hope). is it possible to create an md5 hash of a string in SS2? i have this so far:
Copy code
define N/crypto
var string = "my_string_to_hash"
var hashObj = crypto.createHash({algorithm: crypto.HashAlg.MD5});
hashObj.update({input: string});
var hash = hashObj.digest();
but if i do the same thing twice in a row, the hashes change. is it using the date as part of the hash or something?