RSAKeyPair
class in package klyn.cryptography

    public class RSAKeyPair extends Object:

Object
└ RSAKeyPair

PEM-encoded RSA key pair.

    import klyn.cryptography

    keys = RSAKeyPairGenerator().generateKeyPair()
    print(keys.publicKeyPem.startsWith("-----BEGIN PUBLIC KEY-----"))

Fields

Modifier and Type | Member | Description
--- | --- | ---
public readonly | bits `bits as Int` | RSA modulus size in bits.
public readonly | privateKeyPem `privateKeyPem as String` | Private key in PEM format.
public readonly | publicKeyPem `publicKeyPem as String` | Public key in PEM format.

Inherited Properties
property Inherited Properties from Object: type
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | RSAKeyPair `RSAKeyPair(privateKeyPem as String, publicKeyPem as String, bits as Int):` | Creates a PEM-encoded RSA key pair.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public static | fromMap `fromMap(value as Map<String, Object>) as RSAKeyPair:` | Rebuilds a key pair from a serialized map.
public | toMap `toMap() as Map<String, Object>:` | Converts this key pair to a serializable map.
public override | toString `toString() as String:` | No summary.

Inherited Methods
method Inherited Methods from Object: deepCopy, fromJson, toDict, toJson, toString, toXml