Appearance
DeriveKeyFromPassphrase Method
Definition
- Namespace:
JASE.Interfaces - Assembly:
JASE.dll
byte[] DeriveKeyFromPassphrase(string passphrase, byte[] salt, KeyDerivationAlgorithm? algorithm, int keySize, int? iterations = null, HashProvider? hashProvider = null)
csharp
byte[] DeriveKeyFromPassphrase(string passphrase, byte[] salt, KeyDerivationAlgorithm? algorithm, int keySize, int? iterations = null, HashProvider? hashProvider = null)Performs secure key derivation using PBKDF2 with configurable algorithm, key size, iteration count, and hash provider.
Parameters
| Name | Description |
|---|---|
algorithm | Optional. The key derivation algorithm to use. Currently only PBKDF2 is supported. |
hashProvider | Optional. The hash algorithm to use with PBKDF2. Defaults to the configured or fallback provider. |
iterations | The number of hash iterations. Defaults to 10,000. |
keySize | The desired key size in bytes. Must be between 16 and 64 bytes. |
passphrase | The input passphrase to derive the key from. Must meet minimum length requirements. |
salt | The salt to use for derivation. |
Returns
The securely derived cryptographic key as a byte array.