Class RandomNumber
Provides random number generator methods.
Inherited Members
Namespace: ComponentSpace.Saml2.Utility
Assembly: ComponentSpace.Saml2.dll
Syntax
public static class RandomNumber
  Methods
GenerateRandomBytes(int)
Generates a random byte array.
Declaration
public static byte[] GenerateRandomBytes(int length = 32)
  Parameters
| Type | Name | Description | 
|---|---|---|
| int | length | The length of the byte array.  | 
      
Returns
| Type | Description | 
|---|---|
| byte[] | The random byte array.  | 
      
GenerateRandomID(int)
Generates a random SAML identifier.
Declaration
public static string GenerateRandomID(int length = 32)
  Parameters
| Type | Name | Description | 
|---|---|---|
| int | length | The length of the SAML identifier.  | 
      
Returns
| Type | Description | 
|---|---|
| string | The random SAML identifier  | 
      
GenerateRandomString(int)
Generates a random string.
Declaration
public static string GenerateRandomString(int length = 32)
  Parameters
| Type | Name | Description | 
|---|---|---|
| int | length | The length of the string.  | 
      
Returns
| Type | Description | 
|---|---|
| string | The random string.  |