You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/core/src/trezor/crypto/scripts.py

14 lines
306 B

from trezor.crypto.hashlib import blake256, ripemd160, sha256
def sha256_ripemd160_digest(b: bytes) -> bytes:
h = sha256(b).digest()
h = ripemd160(h).digest()
return h
def blake256_ripemd160_digest(b: bytes) -> bytes:
h = blake256(b).digest()
h = ripemd160(h).digest()
return h