UtilPasswordsMaskSecureString(SecureString, Char, Char) Method
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(
SecureString value,
char[] allowedChars,
char maskCharacter = '*'
)
Public Shared Function MaskSecureString (
value As SecureString,
allowedChars As Char(),
Optional maskCharacter As Char = "*"C
) As SecureString
Dim value As SecureString
Dim allowedChars As Char()
Dim maskCharacter As Char
Dim returnValue As SecureString
returnValue = UtilPasswords.MaskSecureString(value,
allowedChars, maskCharacter)
public:
static SecureString^ MaskSecureString(
SecureString^ value,
array<wchar_t>^ allowedChars,
wchar_t maskCharacter = L'*'
)
static member MaskSecureString :
value : SecureString *
allowedChars : char[] *
?maskCharacter : char
(* Defaults:
let _maskCharacter = defaultArg maskCharacter '*'
*)
-> SecureString
No code example is currently available or this language may not be supported.
- value SecureString
-
The string to mask.
- 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 New SecureString()
With serialKey
.AppendChar("1"c)
.AppendChar("2"c)
.AppendChar("3"c)
.AppendChar("-"c)
.AppendChar("4"c)
.AppendChar("5"c)
.AppendChar("6"c)
.AppendChar("-"c)
.AppendChar("7"c)
.AppendChar("8"c)
.AppendChar("9"c)
End With
Dim allowedChars As Char() = "-".ToCharArray()
Dim maskChar As Char = "*"c
Dim masked As SecureString = MaskSecureString(serialKey, 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.