mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-01 20:32:35 +00:00
14 lines
306 B
Python
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
|