klyn.cryptography.KeyGenerator.getInstance
method

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

Description

Compatibility factory for dynamic algorithm selection.

The preferred API is `AESKeyGenerator()`.

Parameters

Parameter | Description
--- | ---
`algorithm` | Secret-key algorithm.

Returns

Ready-to-use generator.

Throws

- CryptoException when the algorithm is unsupported.

Example

    import klyn.cryptography

    generator = KeyGenerator.getInstance("AES")
    print(generator.algorithm)