RandomGetBytes Method

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

Definition

Namespace: Gemstone.Security.Cryptography
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.158 -- Release Build+8af53c44e6ad1fac543a652d58b46c9843b74b64
public static void GetBytes(
	byte[] buffer
)

Parameters

buffer  Byte
The array to fill with a cryptographically strong sequence of random values.

Remarks

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

This method is thread safe.

Exceptions

CryptographicExceptionThe cryptographic service provider (CSP) cannot be acquired.
ArgumentNullExceptionbuffer is null.

See Also