KeyPairGenerator
class in package klyn.cryptography

    public abstract class KeyPairGenerator extends Object:

Object
└ KeyPairGenerator

Abstract base class for asymmetric key-pair generators.

The primary public RSA API is exposed through `RSAKeyPairGenerator`.

    import klyn.cryptography

    generator as KeyPairGenerator = RSAKeyPairGenerator()
    generator.initialize(2048)
    print(generator.generateKeyPair().bits)

Fields

Modifier and Type | Member | Description
--- | --- | ---
public readonly | algorithm `algorithm as String` | Canonical algorithm name.

Properties inherited from Object: type
Methods

Modifier and Type | Member | Description
--- | --- | ---
public | generateKeyPair `generateKeyPair() as RSAKeyPair throws CryptoException:` | Generates a key pair.
public static | getInstance `getInstance(algorithm as String) as KeyPairGenerator throws CryptoException:` | Compatibility factory for dynamic algorithm selection.
public | init `init(bits as Int) as Void throws CryptoException:` | Short alias for `initialize`.
public | initialize `initialize(bits as Int) as Void throws CryptoException:` | Configures the key size.
public override | toString `toString() as String:` | No summary.

Methods inherited from Object: fromJson, toDict, toJson, toString, toXml