MCPcopy Create free account
hub / github.com/ElementsProject/lightning / hash_djb2

Function hash_djb2

devtools/sql-rewrite.py:95–99  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

93
94# djb2 is simple and effective: see http://www.cse.yorku.ca/~oz/hash.html
95def hash_djb2(string):
96 val = 5381
97 for s in string:
98 val = ((val * 33) & 0xFFFFFFFF) ^ ord(s)
99 return val
100
101
102def colname_htable(query):

Callers 2

colname_htableFunction · 0.70
queries_htableFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected