public class RSAKeyPair extends Object:
PEM-encoded RSA key pair.
import klyn.cryptography
keys = RSAKeyPairGenerator().generateKeyPair()
print(keys.publicKeyPem.startsWith("-----BEGIN PUBLIC KEY-----"))| Modifier and Type | Member | Description |
|---|---|---|
| public readonly | bitsbits as Int |
RSA modulus size in bits. |
| public readonly | privateKeyPemprivateKeyPem as String |
Private key in PEM format. |
| public readonly | publicKeyPempublicKeyPem as String |
Public key in PEM format. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | RSAKeyPairRSAKeyPair(privateKeyPem as String, publicKeyPem as String, bits as Int): |
Creates a PEM-encoded RSA key pair. |
| Modifier and Type | Member | Description |
|---|---|---|
| public static | fromMapfromMap(value as Map<String, Object>) as RSAKeyPair: |
Rebuilds a key pair from a serialized map. |
| public | toMap | Converts this key pair to a serializable map. |
| public override | toStringtoString() as String: |
No summary. |