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