Hash Code of a Random Number

315 Views Asked by At

I have a random number sequence (say 6 bytes)

I now want to generate a shorter sequence from the original sequence (say 3 bytes)

What is the best way of acheiving this so that the randomness of the original sequence is preserved.

Lets say I run a SHA-1 hash code on the original sequence and then grab some bytes from the hashed output. Does the randomness decrease, increase, or stay the same.

The basic question is - Does a Hash Code of a random number produce less random, more random or same randomness.

0

There are 0 best solutions below