I want to compute Hash of a String, but the Hash value should be a number (long or integer).
In other words I want to compute integer hash of a string.
Collusion resistance in not the concern.
Is there an way to convert MessageDigest of SHA-256 to a number.
I am using Java to accomplish this.
A Sha Hash has 256 Bits e.g.
this will exceed the range of long and integer.
You could use
new BigInteger( hash, 16 );for a decimal representation.