11 lines
182 B
Python
11 lines
182 B
Python
|
class Hasher:
|
||
|
|
||
|
def __basehasher(self, v):
|
||
|
h = hashlib.sha256()
|
||
|
h.update(v)
|
||
|
return h.digest()
|
||
|
|
||
|
|
||
|
def hash(self, v):
|
||
|
return self.__basehasher(v)
|