(data: Optional[str], salt: bytes)
return hsh.hexdigest()
Get SHA256 of data
Get SHA256 of data
Get SHA256 of data
def __hash_sha256(data: Optional[str], salt: bytes) -> Optional[str]:
    """ Get SHA256 of data
    """
    if data is None:
        return None

    hsh = sha256(salt)
    hsh.update(data.encode())
    return hsh.hexdigest()
def __hash_sha256 ( data : Optional [ str ] , salt : bytes ) -> Optional [ str ] : if data is None : return None hsh = sha256 ( salt ) hsh . update ( data . encode ( ) ) return hsh . hexdigest ( )