PLShakeXOF

Cryptography

Description

One-shot SHAKE XOF: absorbs the whole input, then squeezes out the requested number of bytes

Wraps PLShakeXOFInit, PLShakeXOFAbsorb, PLShakeXOFFinalize and PLShakeXOFSqueeze around a stack context

Syntax

Delphi

Function PLShakeXOF(Shake128: Boolean; Const Input: AnsiString;
  Out Output: AnsiString; OutputBytes: Integer): Boolean;

Parameters

Shake128Selects SHAKE128 (rate 168) when True, SHAKE256 (rate 136) when False
InputBytes to absorb; may be empty
OutputReceives exactly OutputBytes raw bytes
OutputBytesRequested output length; values below 1 fail immediately

Return values

FalseOutputBytes is below 1; Output is set to an empty string
TrueOutput holds OutputBytes raw binary bytes

Remarks

The result is raw binary, not hexadecimal; the fixed-length PDF-signature profile entry points are SHAKE256ByteArray and SHAKE256StreamRange

See also

SHAKE256ByteArray, SHAKE256StreamRange, PLShakeXOFInit, PLShakeXOFSqueeze