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.137 -- Release Build+84492f84208b356bfb930d6c506a4bce06d2449a
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