function DJB2Hash(key: string) {
let hash = 5381; // magic start djb2 number
for (let i = 0; i < key.length; i++) {
hash = (hash << 5) + hash + key.charCodeAt(i);
// using (hash << 5 + hash) instead of hash * 33 because '<<' is operation is faster than '*' on computer cpu
hash = hash & hash;
}