just_anonchat/hash.py

7 lines
128 B
Python
Raw Permalink Normal View History

import hashlib
def hash(string):
string = str(string)
hashed = hashlib.sha256(str.encode(string)).hexdigest()
return hashed