CapyKit/Documentation/Help/M_CapyKit_Helpers_SecurityHelper_GetRandomString_1.md

42 lines
1.4 KiB
Markdown
Raw Normal View History

2024-04-21 01:20:26 -05:00
# GetRandomString(Int32, ValidCharacterCollection[]) Method
Gets a cryptographically strong random string using the character values found in [!:VALID_CHARACTERS].
## Definition
2024-04-21 03:30:36 -05:00
**Namespace:** <a href="N_CapyKit_Helpers.md">CapyKit.Helpers</a>
2024-09-04 19:31:43 -05:00
**Assembly:** CapyKit (in CapyKit.dll) Version: 1.0.2
2024-04-21 01:20:26 -05:00
**C#**
``` C#
public static string GetRandomString(
int length,
params ValidCharacterCollection[] validChars
)
```
**F#**
``` F#
static member GetRandomString :
length : int *
validChars : ValidCharacterCollection[] -> string
```
#### Parameters
2024-04-21 03:30:36 -05:00
<dl><dt>  <a href="https://learn.microsoft.com/dotnet/api/system.int32" target="_blank" rel="noopener noreferrer">Int32</a></dt><dd>The length of the string to create.</dd><dt>  <a href="T_CapyKit_Helpers_ValidCharacterCollection.md">ValidCharacterCollection</a>[]</dt><dd>\[Missing &lt;param name="validChars"/&gt; documentation for "M:CapyKit.Helpers.SecurityHelper.GetRandomString(System.Int32,CapyKit.Helpers.ValidCharacterCollection[])"\]</dd></dl>
2024-04-21 01:20:26 -05:00
#### Return Value
<a href="https://learn.microsoft.com/dotnet/api/system.string" target="_blank" rel="noopener noreferrer">String</a>
The random string.
## See Also
#### Reference
2024-04-21 03:30:36 -05:00
<a href="T_CapyKit_Helpers_SecurityHelper.md">SecurityHelper Class</a>
<a href="Overload_CapyKit_Helpers_SecurityHelper_GetRandomString.md">GetRandomString Overload</a>
<a href="N_CapyKit_Helpers.md">CapyKit.Helpers Namespace</a>