1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-07-01 20:32:35 +00:00
trezor-firmware/core/src/trezor/crypto/scripts.py
2019-04-15 19:14:40 +02:00

14 lines
306 B
Python

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