def djb2(s: str) -> int:
"""
Implementation of djb2 hash algorithm that
is popular because of it's magic constants.
>>> djb2('Algorithms')
3782405311
>>> djb2('scramble bits')
1609059040
"""
hash = 5381
for x in s:
hash = ((hash << 5) + hash) + ord(x)
return hash & 0xFFFFFFFF