Interface IPasswordAlgorithm
- Namespace
- CapyKit
- Assembly
- CapyKit.dll
Defines the contract for password encryption algorithms.
public interface IPasswordAlgorithm
- Extension Methods
Properties
AlgorithmName
Gets the name of the algorithm.
string AlgorithmName { get; }
Property Value
Methods
Compare(string, byte[], params object[])
Compares the given plaintext password with an encrypted value using PBKDF2 algorithm.
bool Compare(string password, byte[] encryptedValue, params object[] args)
Parameters
passwordstringThe plaintext password to compare.
encryptedValuebyte[]The encrypted value to compare against.
argsobject[]Additional arguments for the encryption process, such as salt and length.
Returns
- bool
True if the given
passwordmatches theencryptedValue, false if they are different.
Encrypt(string, params object[])
Encrypts the given password using a defined algorithm.
byte[] Encrypt(string password, params object[] args)
Parameters
passwordstringThe plaintext password.
argsobject[]Additional arguments for the encryption process, such as salt and length.
Returns
- byte[]
A byte array with the hashed
password.