INNER CODE UNIT · Python
new
demining/CryptoDeepTools · 17BTCRecoverCryptoGuide/lib/eth_hash/main.py:40
def new(self, preimage: (Union[bytes, bytearray])) -> BasePreImage:
if not isinstance(preimage, (bytes, bytearray)):
raise TypeError(
"Can only compute the hash of `bytes` or `bytearray` values, not %r" % preimage
)
return self.preimage(preimage)