public class PBKDF2 extends SecretKeyFactory:
PBKDF2 password-based key derivation parameterized by a concrete digest.
import klyn.cryptography
kdf = PBKDF2(SHA256())
spec = PBEKeySpec("password", "salty", 100000, 32)
print(kdf.generateSecret(spec))| Modifier and Type | Member | Description |
|---|---|---|
| public readonly | hashAlgorithmhashAlgorithm as String |
Canonical digest algorithm name used by this PBKDF2 instance. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | PBKDF2PBKDF2() throws CryptoException: |
Creates a PBKDF2 instance using `SHA256`. |
| public | PBKDF2PBKDF2(hash as Object) throws CryptoException: |
Creates a PBKDF2 instance bound to the given digest algorithm. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | generateSecretgenerateSecret(spec as PBEKeySpec) as String throws CryptoException: |
Performs a cryptographic operation. |
| public override | generateSecretgenerateSecret(spec as PBEKeySpec, outputEncoding as String) as String throws CryptoException: |
Performs a cryptographic operation. |