Exemplo n.º 1
0
def keccak256(prehash: bytes) -> bytes:
    return _keccak_256(prehash).digest()
Exemplo n.º 2
0
 def keccak256(self, prehash: Union[bytearray, bytes]) -> bytes:
     return _keccak_256(prehash).digest()  # type: ignore
Exemplo n.º 3
0
 def __init__(self, prehash) -> None:
     self._hash = _keccak_256(prehash)
Exemplo n.º 4
0
def keccak_256(b: bytes) -> bytes:
    h = _keccak_256()
    h.update(b)
    return h.digest()