Atlassian interview question

write a hash function