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. |