What exactly does this do? I tried to look it up but didn't find anything.
Reason for asking is I want to incorporate a SALT byte[]
into a value which is then hashed. So should it be done like this (Pseudo code):
MessageDigest.update(SALT);
MessageDigest.update(value);
digestValue = MessageDigest.digest();
// Where SALT, value and digestValue are array bytes, byte[]
Does this add both SALT
and value
to the final digest or should I combine both variables into one and then update
it once?
I couldn't find an answer for this in any documentation, any clarification would be appreciated.
Thank you, cheers.