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

- algorithm Secret-key algorithm.

Returns

Ready-to-use generator.

Throws

- CryptoException when the algorithm is unsupported. ```klyn import klyn.cryptography generator = KeyGenerator.getInstance("AES") print(generator.algorithm) ```