Skip to Content
oxcrypto
HashesProtocol compatibility

RIPEMD

RIPEMD digest algorithms.

Example

from oxcrypto.hash.ripemd import RIPEMD

algorithm = RIPEMD.RIPEMD128
digest = algorithm.digest(b"hello")
assert digest == algorithm.digest_chunks([b"he", b"llo"])

hasher = algorithm.new()
hasher.update(b"he")
hasher.update(b"llo")
assert hasher.digest() == digest
print(digest.hex())

Variants

  • RIPEMD.RIPEMD128
  • RIPEMD.RIPEMD160
  • RIPEMD.RIPEMD256
  • RIPEMD.RIPEMD320

Methods

digest(self, data: bytes, /) -> bytes
digest_chunks(self, chunks: Iterable[bytes], /) -> bytes
new(self) -> Hasher

On this page