Click or drag to resize

RandomGetBytes Method

Fills an array of bytes with a cryptographically strong sequence of random values.

Namespace: GSF.Security.Cryptography
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.181-beta
Syntax
public static void GetBytes(
	byte[] buffer
)
View Source

Parameters

buffer  Byte
The array to fill with a cryptographically strong sequence of random values.
Exceptions
ExceptionCondition
CryptographicExceptionThe cryptographic service provider (CSP) cannot be acquired.
ArgumentNullExceptionbuffer is null.
Remarks

The length of the byte array determines how many cryptographically strong random bytes are produced.

This method is thread safe.

See Also