prfBytes
Generate output bytes using a pseudorandom function (PRF).
Syntax
[VBA]
Public Function prfBytes ( _
nBytes As Long, _
lpMessage() As Byte, _
lpKey() As Byte, _
nOptions As Long, _
Optional szCustom As String = "" _
) As Byte()
Parameters
- nBytes
- Required number of output bytes.
- lpMessage
- Input message data.
- lpKey
- Key (expected 128 or 256 bits long).
- nOptions
- PRF function to be used. Select one from:
PKI_KMAC_128
PKI_KMAC_256
- szCustom
- Customization string (optional).
Return Value
Byte(): Output data in byte array.
Remarks
The KMAC128 and KMAC256 PRF functions are described in NIST SP800-185 (SHA-3 Derived Functions),
and use SHAKE128 and SHAKE256, respectively.
Note different order of parameters from core function.