RSAKeyPairGenerator
class in package klyn.cryptography

    public class RSAKeyPairGenerator extends KeyPairGenerator:

Object
└ KeyPairGenerator
└ RSAKeyPairGenerator

RSA key-pair generator.

Generated keys are returned in PEM format.

    import klyn.cryptography

    generator = RSAKeyPairGenerator()
    generator.initialize(2048)
    keys = generator.generateKeyPair()
    print(keys.bits)

Attributes inherited from KeyPairGenerator: algorithm
Properties inherited from Object: type
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | RSAKeyPairGenerator `RSAKeyPairGenerator():` | Creates a new RSA key-pair generator.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public override | generateKeyPair `generateKeyPair() as RSAKeyPair throws CryptoException:` | Performs a cryptographic operation.
public override | initialize `initialize(bits as Int) as Void throws CryptoException:` | Performs a cryptographic operation.

Methods inherited from KeyPairGenerator: generateKeyPair, getInstance, init, initialize, toString
Methods inherited from Object: fromJson, toDict, toJson, toString, toXml