Hi all, I am trying to generate a hash from the cr...
# suitescript
d
Hi all, I am trying to generate a hash from the crypto library however the code samples do not make it very clear on how I actually get the resulting hash from the hash object…. here is my test sample code but I am not sure where to take it from here.
Copy code
ar QRG_HASH = "L:AKJDLS:KJSDF*()&@#()*&$@#()*&@#$()*&@#(AESFHJDSHFFKL:JS";
var hash_maker = crypto.createHash({algorithm: crypto.HashAlgorithm.SHA256});
var stomach = hash_maker.digest({outputEncoding: encode.Encoding.HEX});
stomach.update({input: QRG_HASH});
b
wrong order
update first, then digest
return value of digest is your hash string
d
@battk battk 4tw