SHAKE256ByteArray

Cryptography

Description

Computes the SHAKE256 extendable-output digest of a byte array

Syntax

Delphi

Function SHAKE256ByteArray(OutputBytes: Integer; Const Input: Array Of Byte): AnsiString;

Return values

The OutputBytes digest bytes, or an empty string when OutputBytes is outside 1..64

Remarks

SHAKE256 is the extendable-output function of FIPS 202 referenced by ISO/TS 32001 and RFC 8702. OutputBytes clamps the digest to 1..64 bytes; the PDF signature profile uses 32. The implementation shares the Keccak permutation with the SHA-3 family and differs only in the domain separator, and is verified against the NIST known-answer tests. Within CMS signing SHAKE256 is reserved as the internal digest of Ed448 and is not a digest-selector value

Example

Digest:= SHAKE256ByteArray(32, Data);

See also

SHA3_256ByteArray, SHA256StreamRange