-
Notifications
You must be signed in to change notification settings - Fork 0
Credential.cs
Avrigeanu Laurian edited this page Apr 14, 2023
·
2 revisions
The Credential
class represents a set of credentials consisting of a Name
string and a SecureString
Value
.
-
Name
: A string representing the name of the credential. -
Value
: ASecureString
representing the value of the credential.
-
Credential()
: Initializes a new instance of theCredential
class with default values. -
Credential(string name, SecureString value)
: Initializes a new instance of theCredential
class with the specified name and value.
The Credential
class is commonly used to store sensitive information such as passwords, API keys, or access tokens. The SecureString
class is used to provide additional protection for the sensitive data by storing it in memory in an encrypted form.
It is recommended to use Credential
instances only when necessary, and to dispose of them as soon as they are no longer needed to reduce the risk of the sensitive information being exposed. When creating Credential
instances, it is important to securely dispose of the SecureString
object containing the sensitive data after it is no longer needed.