HashesProtocol compatibility
Bash
Bash hash digest algorithms.
Example
from oxcrypto.hash.bash_hash import BASH_HASH
algorithm = BASH_HASH.BASH_HASH256
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
BASH_HASH.BASH_HASH256BASH_HASH.BASH_HASH384BASH_HASH.BASH_HASH512
Methods
digest(self, data: bytes, /) -> bytes
digest_chunks(self, chunks: Iterable[bytes], /) -> bytes
new(self) -> Hasher