Class Password
- Namespace
- CapyKit
- Assembly
- CapyKit.dll
Represents a password with its hash, salt and algorithm used for encryption.
public class Password
- Inheritance
-
Password
- Inherited Members
- Extension Methods
Constructors
Password(string, byte[], IPasswordAlgorithm, params object[])
Constructor.
public Password(string password, byte[] salt, IPasswordAlgorithm algorithm, params object[] args)
Parameters
passwordstringThe password to be hashed.
saltbyte[]The salt used for encryption.
algorithmIPasswordAlgorithmThe algorithm used for password encryption.
argsobject[]A variable-length parameters list containing arguments to include for the
algorithm.
Properties
Algorithm
Gets or sets the algorithm used for password encryption.
public IPasswordAlgorithm Algorithm { get; }
Property Value
Hash
Gets or sets the hash of the password.
public byte[] Hash { get; }
Property Value
- byte[]
Pbkdf2Algorithm
Gets the preconfigured PBKDF2 algorithm.
public static Pbkdf2Algorithm Pbkdf2Algorithm { get; }
Property Value
- Pbkdf2Algorithm
The preconfigured PBKDF2 algorithm.
Salt
Gets or sets the salt used for encryption.
public byte[] Salt { get; }
Property Value
- byte[]
Methods
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Operators
operator ==(Password, Password)
public static bool operator ==(Password a, Password b)
Parameters
Returns
operator !=(Password, Password)
public static bool operator !=(Password a, Password b)