File size: 190 Bytes
dfdddb1
 
 
 
 
 
 
1
2
3
4
5
6
7
import hashlib

def hash_text(text: str) -> str:
    return hashlib.sha256(text.encode('utf-8')).hexdigest()

def hash_bytes(data: bytes) -> str:
    return hashlib.sha256(data).hexdigest()