Show / Hide Table of Contents

Class RandomNumber

Provides random number generator methods.

Inheritance
object
RandomNumber
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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.

In this article
Back to top Copyright © ComponentSpace Pty Ltd 2017-2025. All rights reserved.