|   | RandomGetBytes Method | 
        
        
            Fills an array of bytes with a cryptographically strong sequence of random values.
            
        
        Namespace: GSF.Security.CryptographyAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.257-beta+00aa2366fbb9ec75f636ebc7cfa610e3826a727c
 Syntax
Syntaxpublic static void GetBytes(
	byte[] buffer
)
Public Shared Sub GetBytes ( 
	buffer As Byte()
)
public:
static void GetBytes(
	array<unsigned char>^ buffer
)
static member GetBytes : 
        buffer : byte[] -> unit GSF.Security.Cryptography.Random.GetBytes = function(buffer);
Parameters
- buffer  Byte
- The array to fill with a cryptographically strong sequence of random values.
 Exceptions
Exceptions| Exception | Condition | 
|---|
| CryptographicException | The cryptographic service provider (CSP) cannot be acquired. | 
| ArgumentNullException | buffer is null. | 
 Remarks
RemarksThe length of the byte array determines how many cryptographically strong random bytes are produced.
This method is thread safe.
 See Also
See Also