UtilPasswordsMaskSecureString(String, Int32, Boolean, Char, Char) Method
Partially masks the source string with a specific character,
allowing certain characters to remain unmasked.
Namespace: DevCase.Core.Security.PasswordsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static SecureString MaskSecureString(
string input,
int maskLength,
bool leftToRight,
char[] allowedChars,
char maskCharacter = '*'
)
Public Shared Function MaskSecureString (
input As String,
maskLength As Integer,
leftToRight As Boolean,
allowedChars As Char(),
Optional maskCharacter As Char = "*"C
) As SecureString
Dim input As String
Dim maskLength As Integer
Dim leftToRight As Boolean
Dim allowedChars As Char()
Dim maskCharacter As Char
Dim returnValue As SecureString
returnValue = UtilPasswords.MaskSecureString(input,
maskLength, leftToRight, allowedChars,
maskCharacter)
public:
static SecureString^ MaskSecureString(
String^ input,
int maskLength,
bool leftToRight,
array<wchar_t>^ allowedChars,
wchar_t maskCharacter = L'*'
)
static member MaskSecureString :
input : string *
maskLength : int *
leftToRight : bool *
allowedChars : char[] *
?maskCharacter : char
(* Defaults:
let _maskCharacter = defaultArg maskCharacter '*'
*)
-> SecureString
No code example is currently available or this language may not be supported.
- input String
-
The string to mask.
- maskLength Int32
-
The length of the mask.
- leftToRight Boolean
-
Indicates the direction of the mask (left to right or right to left).
- allowedChars Char
-
An array of characters that are allowed to remain unmasked.
- maskCharacter Char (Optional)
-
The character used for masking (default: "*").
SecureString
The masked string.
This is a code example.
No code example is currently available or this language may not be supported.
Dim serialKey As String = "123-456-789"
Dim maskLength As Integer = 7
Dim leftToRight As Boolean = True
Dim allowedChars As Char() = "-".ToCharArray()
Dim maskChar As Char = "*"c
Dim masked As SecureString = MaskSecureString(serialKey, maskLength, leftToRight, allowedChars, maskChar)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.