RNGCryptoServiceProvider.GetBytes Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Fills an array of bytes with a cryptographically strong sequence of random values.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- data
- Type:
System.Byte
()
The array to fill with a cryptographically strong sequence of random values.
| Exception | Condition |
|---|---|
| CryptographicException | The cryptographic service provider (CSP) cannot be acquired. |
| ArgumentNullException | data is Nothing. |
Show: