HashesProtocol compatibility
GOST94
GOST R 34.11-94 digest algorithms.
Example
from oxcrypto.hash.gost94 import GOST94
algorithm = GOST94.GOST94_CRYPTO_PRO
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
GOST94.GOST94_CRYPTO_PROGOST94.GOST94_S2015GOST94.GOST94_TESTGOST94.GOST94_UA
Methods
digest(self, data: bytes, /) -> bytes
digest_chunks(self, chunks: Iterable[bytes], /) -> bytes
new(self) -> Hasher