0
How I calculate the hash value of a specific byte array?
I’m using MD5 encryption and the code to calculate what I’m using is this:
byte[] dataRegCodeToCompare = md5.digest(toHash);
The variable toHash
is the byte array. I already have a table of values of toHash
and dataRegCodeToCompare
that has to come out but, calculated and inserted in dataRegCodeToCompare
are not knocking.
Follows the values of toHash
:
[52, 80, 69, 82, 68, 73, 57, 78, 69, 67, 56, 56, 73, 80, 49, 73, 53, 79, 48, 68, 65, 65, 51, 67, 52, 79, 50, 82, 53, 82, 65, 69]
Follows the values of dataRegCodeToCompare
: [43, 252, 237, 75, 30, 238, 188, 243, 213, 203, 78, 212, 226, 27, 49, 241]
And these are the values of dataRegCodeToCompare
who are leaving with the code indicated at the beginning of the question: [43, -4, -19, 75, 30, -18, -68, -13, -43, -53, 78, -44, -30, 27, 49, -15] some values are even negative.
Relevant: http://answall.com/q/2402/101
– Maniero
@bigown, unfortunately this link did not help me...
– kaamis