Skip to Content
oxcrypto

Bash programmable hash

Generate digest bytes for protocols using Bash programmable hashing.

from oxcrypto.xof.bash_prg_hash import BASH_PRG_HASH

algorithm = BASH_PRG_HASH.BASH_PRG128_1
output = algorithm.digest(b"message", 32, header=b"context")

Select one of the six variants using the protocol's security level (128, 192, or 256) and capacity factor (1 or 2). Pass the protocol header as bytes or use the empty default.