Class Pbkdf2Algorithm
Implements the PBKDF2 algorithm for password encryption.
Implements
Namespace: CapyKit
Assembly: CapyKit.dll
Syntax
public class Pbkdf2Algorithm : IPasswordAlgorithm
Constructors
Pbkdf2Algorithm()
Default constructor.
Declaration
public Pbkdf2Algorithm()
Fields
ITERATIONS
The default number of iterations.
Declaration
public const int ITERATIONS = 100000
Field Value
| Type | Description |
|---|---|
| int |
Remarks
This member is immutable.
LENGTH
(Immutable) The default length.
Declaration
public const int LENGTH = 32
Field Value
| Type | Description |
|---|---|
| int |
Remarks
This member is immutable.
Properties
AlgorithmName
Gets the name of the algorithm.
Declaration
public string AlgorithmName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Encrypt(string, params object[])
Encrypts the given password using a PBKDF2 algorithm.
Declaration
public byte[] Encrypt(string password, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| string | password | The plaintext password. |
| object[] | args | Additional arguments for the encryption process, specifically
|
Returns
| Type | Description |
|---|---|
| byte[] | A byte array with the hashed |