RandomNumberGenerator.GetBytes Method
Microsoft Silverlight will reach end of support after October 2021. Learn more.
When overridden in a derived class, fills an array of bytes with a cryptographically strong, random sequence of values.
Namespace: System.Security.Cryptography
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public MustOverride Sub GetBytes ( _
data As Byte() _
)
public abstract void GetBytes(
byte[] data
)
Parameters
- data
Type: array<System.Byte[]
The array to fill with cryptographically strong, random bytes.
Remarks
The length of the byte array determines how many random bytes are produced.
Version Information
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
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
See Also