Key Management
Generating Classical Keys
import io.kodium.Kodium
import io.kodium.KodiumPrivateKey
// Generate a new key pair
val myKeyPair: KodiumPrivateKey = Kodium.generateKeyPair()
// Extract the public part to share with others
val myPublicKey = myKeyPair.getPublicKey()Exporting and Importing
Exporting Keys
// Export Public Key (Safe to share openly)
val b58PubKey: String = myPublicKey.exportToEncodedString()
// Export Private Key (Encrypted with a password)
val b58PrivKey: String = myKeyPair.exportToEncryptedString("your-secure-password").getOrThrow()Importing Keys
Key Sizes
Key Type
Raw Size
Base58 Encoded Size
Last updated