class SHA3::Digest::SHAKE_256
SHAKE_256
is an extendable-output function (XOF) that can produce hash values of any desired length.
Usage:
digest = SHA3::Digest::SHAKE_256.new digest.update("message") hash = digest.hexdigest(32) # Get 32 bytes (64 hex chars) of output # Or more simply: hash = SHA3::Digest::SHAKE_256.hexdigest("message", 32)
See SHA3::Digest
for complete API list and additional documentation.