klyn.cryptography.SecretKeyFactory.getInstance
method

    public static getInstance(algorithm as String) as SecretKeyFactory throws CryptoException:

Description

Compatibility factory for dynamic algorithm selection.

The preferred API is `PBKDF2(SHA256())`.

Parameters

- algorithm Derivation algorithm.

Returns

Ready-to-use secret-key factory.

Throws

- CryptoException when the algorithm is unsupported. ```klyn import klyn.cryptography factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA256") print(factory.algorithm) ```