Generates true random strings of various length and character compositions.
More...
|
| static int | CalcBits (int length, int number=1) |
| | Calculates needed bits (from the quota) for generating random strings. NOTE: The calculated value is an approximation and will may differ from the real quota deducted from the server.
|
| |
| static List< string > | Generate (int length, int number=1, bool digits=true, bool upper=true, bool lower=true, bool unique=false, bool prng=false) |
| | Generates random strings.
|
| |
| static async Task< List< string > > | GenerateAsync (int length, int number=1, bool digits=true, bool upper=true, bool lower=true, bool unique=false, bool prng=false) |
| | Generates random strings asynchronously.
|
| |
| static List< string > | GeneratePRNG (int length, int number=1, bool digits=true, bool upper=true, bool lower=true, bool unique=false, int seed=0) |
| | Generates random strings with the C#-standard Pseudo-Random-Number-Generator.
|
| |
|
| static List< string > | Result = [] [get] |
| | Returns the list of strings from the last generation.
|
| |
Properties inherited from BogaNet.TrueRandom.BaseTRNG |
| static int | Seed [get] |
| | Returns a seed for the PRNG.
|
| |
Generates true random strings of various length and character compositions.
◆ CalcBits()
| static int BogaNet.TrueRandom.StringTRNG.CalcBits |
( |
int | length, |
|
|
int | number = 1 ) |
|
static |
Calculates needed bits (from the quota) for generating random strings. NOTE: The calculated value is an approximation and will may differ from the real quota deducted from the server.
- Parameters
-
| length | Length of the strings |
| number | How many strings (default: 1, optional) |
- Returns
- Needed bits for generating the strings.
◆ Generate()
| static List< string > BogaNet.TrueRandom.StringTRNG.Generate |
( |
int | length, |
|
|
int | number = 1, |
|
|
bool | digits = true, |
|
|
bool | upper = true, |
|
|
bool | lower = true, |
|
|
bool | unique = false, |
|
|
bool | prng = false ) |
|
static |
Generates random strings.
- Parameters
-
| length | How long the strings should be (range: 1 - 20) |
| number | How many strings you want to generate (optional, range: 1 - 10'000, default: 1) |
| digits | Allow digits (0-9) (optional, default: true) |
| upper | Allow uppercase letters (optional, default: true) |
| lower | Allow lowercase letters (optional, default: true) |
| unique | String should be unique (optional, default: false) |
| prng | Use Pseudo-Random-Number-Generator (optional, default: false) |
◆ GenerateAsync()
| static async Task< List< string > > BogaNet.TrueRandom.StringTRNG.GenerateAsync |
( |
int | length, |
|
|
int | number = 1, |
|
|
bool | digits = true, |
|
|
bool | upper = true, |
|
|
bool | lower = true, |
|
|
bool | unique = false, |
|
|
bool | prng = false ) |
|
static |
Generates random strings asynchronously.
- Parameters
-
| length | How long the strings should be (range: 1 - 20) |
| number | How many strings you want to generate (optional, range: 1 - 10'000, default: 1) |
| digits | Allow digits (0-9) (optional, default: true) |
| upper | Allow uppercase letters (optional, default: true) |
| lower | Allow lowercase letters (optional, default: true) |
| unique | String should be unique (optional, default: false) |
| prng | Use Pseudo-Random-Number-Generator (optional, default: false) |
◆ GeneratePRNG()
| static List< string > BogaNet.TrueRandom.StringTRNG.GeneratePRNG |
( |
int | length, |
|
|
int | number = 1, |
|
|
bool | digits = true, |
|
|
bool | upper = true, |
|
|
bool | lower = true, |
|
|
bool | unique = false, |
|
|
int | seed = 0 ) |
|
static |
Generates random strings with the C#-standard Pseudo-Random-Number-Generator.
- Parameters
-
| length | How long the strings should be |
| number | How many strings you want to generate (optional, default: 1) |
| digits | Allow digits (0-9) (optional, default: true) |
| upper | Allow uppercase (A-Z) letters (optional, default: true) |
| lower | Allow lowercase (a-z) letters (optional, default: true) |
| unique | String should be unique (optional, default: false) |
| seed | Seed for the PRNG (optional, default: 0 (=standard)) |
- Returns
- List with the generated strings.
◆ Result
| List<string> BogaNet.TrueRandom.StringTRNG.Result = [] |
|
staticget |
Returns the list of strings from the last generation.
- Returns
- List of strings from the last generation.
The documentation for this class was generated from the following file:
- /Users/stefanlaubenberger/Projects/CSharp/BogaNet/BogaNet.TrueRandom/TrueRandom/StringTRNG.cs