BP Hash
BP is a hash function algorithm.
unsigned int BPHash(char* str, unsigned int length) {
unsigned int hash = 0;
unsigned int i = 0;
for (i = 0; i < length; str++, i++)
{
hash = hash << 7 ^ (*str);
}
return hash;
}
Example
char* data = "jdfgsdhfsdfsd 6445dsfsd7fg/*/+bfjsdgf%$^";
unsigned int value = BPHash(data, 40);
Output
2093568606