Would anybody mind explaining this formula please? I need to hash a word but have no idea what the value equalling to ASCII is
>>7962016
m=Athens is in Greece
m_1 = ASCII value of A
m_2 = ASCII value of t
m_3 = ASCII value of h
etc.
What do you not get?
>>7962021
But where does the mod 13 come into the equation?
>>7962027
The ASCII values are numbers.
You take those numbers mod 13.
>>7962028
Ah right, thank you very much
>>7962027
sum up the ASCII values of the string then mod 13 the result.
>>7962036
I got 2311, mod that by 13 and the result is 10. Seems like an odd hash function for a string of words