Skip to Content
oxcrypto
HashesLegacy compatibility

MD4

MD4 digest algorithms.

MD4 is cryptographically broken. Available for legacy compatibility.

Example

from oxcrypto.hash.md4 import MD4

algorithm = MD4.MD4
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

  • MD4.MD4

Methods

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

On this page