Click or drag to resize

RngBytes(Int32) Method

Generate an array of random bytes.

Namespace: CryptoSysPKI
Assembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.25611 (23.0.0.0)
Syntax
public static byte[] Bytes(
	int numBytes
)

Parameters

numBytes  Int32
Required number of random bytes

Return Value

Byte
Array of random bytes
Example
C#
byte[] b = Rng.Bytes(16);
Console.WriteLine("Rng.Bytes(16)={0}", b.ToHex());
// e.g. 3FD45EB7715CE91C9F1DB69DBF6677ED (always different)
See Also