This topic has not yet been rated - Rate this topic

RNGCryptoServiceProvider.GetBytes Method

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

Namespace:  System.Security.Cryptography
Assembly:  mscorlib (in mscorlib.dll)
[SecuritySafeCriticalAttribute]
public override void GetBytes(
	byte[] data
)

Parameters

data
Type: System.Byte[]
The array to fill with a cryptographically strong sequence of random values.
ExceptionCondition
CryptographicException

The cryptographic service provider (CSP) cannot be acquired.

ArgumentNullException

data is null.

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

This method is thread safe.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.