Skip to Content
oxcrypto
HashesProtocol compatibility

JH

JH digest algorithms.

Example

from oxcrypto.hash.jh import JH

algorithm = JH.JH224
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

  • JH.JH224
  • JH.JH256
  • JH.JH384
  • JH.JH512

Methods

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

On this page