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