Add hash function based on djb2