klyn.cryptography.KeyPairGenerator.getInstance
method

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

Description

Compatibility factory for dynamic algorithm selection.

The preferred API is `RSAKeyPairGenerator()`.

Parameters

Parameter | Description
--- | ---
`algorithm` | Key-pair algorithm.

Returns

Ready-to-use generator.

Throws

- CryptoException when the algorithm is unsupported.

Example

    import klyn.cryptography

    generator = KeyPairGenerator.getInstance("RSA")
    print(generator.algorithm)