Generate output bytes using a pseudorandom function (PRF).
public static byte[] Bytes( int numBytes, byte[] message, byte[] key, Prf.Alg prfAlg, string customStr = "" )
Public Shared Function Bytes ( numBytes As Integer, message As Byte(), key As Byte(), prfAlg As Prf.Alg, Optional customStr As String = "" ) As Byte()
// Sample #1: "standard" KMAC output length KMAC128 => 256 bits, no custom string int nbytes = 256 / 8; byte[] msg = "00010203".FromHex(); byte[] key = "404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F".FromHex(); byte[] b = Prf.Bytes(nbytes, msg, key, Prf.Alg.Kmac128); Console.WriteLine("OUT={0}", b.ToHex()); // E5780B0D3EA6F7D3A429C5706AA43A00FADBD7D49628839E3187243F456EE14E
VB6/C equivalent: PRF_Bytes