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

Parameter | Description
--- | ---
`algorithm` | Derivation algorithm.

Returns

Ready-to-use secret-key factory.

Throws

- CryptoException when the algorithm is unsupported.

Example

    import klyn.cryptography

    factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA256")
    print(factory.algorithm)