Class RandomHelper
Helper to generate random string
Inheritance
System.Object
RandomHelper
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: SecureExchangesSDK.Helpers
Assembly: SecureExchangesSDK.dll
Syntax
public static class RandomHelper
Fields
LOWER_CHARS
lower alpha char
Declaration
public const string LOWER_CHARS = "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"
Field Value
Type | Description |
---|---|
System.String |
NUMERIC_CHARS
Numeric const
Declaration
public const string NUMERIC_CHARS = "0,1,2,3,4,5,6,7,8,9"
Field Value
Type | Description |
---|---|
System.String |
SPECIAL_CHARS
Special schar
Declaration
public const string SPECIAL_CHARS = "!,$,*,@,#,<,>,[,]"
Field Value
Type | Description |
---|---|
System.String |
UPPER_CHARS
Upper chars
Declaration
public const string UPPER_CHARS = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z"
Field Value
Type | Description |
---|---|
System.String |
Properties
ALPHAS_CHARS
Alpha string, with case sensitive
Declaration
public static string ALPHAS_CHARS { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
CombineCharsList(String[])
Combiene multiple list into one
Declaration
public static string CombineCharsList(params string[] list)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | list |
Returns
Type | Description |
---|---|
System.String |
GenerateCode(Int32)
Generate code with number only
Declaration
public static string GenerateCode(int length)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | length | Length of the generated number |
Returns
Type | Description |
---|---|
System.String |
GenerateCode(Int32, String)
Declaration
public static string GenerateCode(int length, string charString)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | length | |
System.String | charString |
Returns
Type | Description |
---|---|
System.String |
GenerateComplexPassword(Int32)
Generate password with numeric, special chars and alphachars
Declaration
public static string GenerateComplexPassword(int length)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | length | The lenght of the string |
Returns
Type | Description |
---|---|
System.String |
GeneratePasswordWithPolicy(BusinessPasswordSuggestionPolicy)
That will generate password by policy
Declaration
public static string GeneratePasswordWithPolicy(BusinessPasswordSuggestionPolicy policy)
Parameters
Type | Name | Description |
---|---|---|
BusinessPasswordSuggestionPolicy | policy |
Returns
Type | Description |
---|---|
System.String |
Next(Int32, Int32)
Declaration
public static int Next(int minValue, int maxExclusiveValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | minValue | |
System.Int32 | maxExclusiveValue |
Returns
Type | Description |
---|---|
System.Int32 |