toTo
asked on
hash function wanted
In order to index an adress book, i am looking for a simple hash function.
Say take a 48 byte names and make 4 bytes digest.
Say take a 48 byte names and make 4 bytes digest.
Is this homework?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you to provides those URLs
I could not find them on search engins.
Thanks to 3rsrichard, too bad it is not homework, his answer would have been a good start.
I could not find them on search engins.
Thanks to 3rsrichard, too bad it is not homework, his answer would have been a good start.
char output[4];
int i;
for (i=0; i<48; i+=4){
output[0] ^= input[i];
output[1]^=input[i+1];
output[2]^=input[i+2];
output[3]"=input[i+3];
};
or did you want something fancier??