public toMap() as Map<String, Object>:
Converts this key pair to a serializable map.
Map containing privateKeyPem, publicKeyPem and bits.
privateKeyPem
publicKeyPem
bits
import klyn.cryptography keys = RSAKeyPairGenerator().generateKeyPair() print(keys.toMap()["bits"])