Jesper <Je****@discussions.microsoft.com> wrote:
Is it possible to adjust the hash size of the algorithm used. I would like
to get a hash size less than 160 bit.
I believe the MD5 algorithm is specifically defined to be 128-bit, and
and SHA-1 is defined to produce a 160-bit hash, rather than being
defined for an arbitrary hash size.
In other words, no. Of course, you could always ignore half the hash...
a well-behaved cryptographically-strong hash should be equally pseudo-
random in all bits, so by taking only part of it you should just get a
weaker version in terms of the probability of hash collisions.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too