Symmetric Encryption (SecretBox)
Basic Usage
Encrypting
import io.kodium.Kodium
val password = "CorrectHorseBatteryStaple"
val secretData = "Launch codes: 12345".encodeToByteArray()
// Encrypt the data using the password
val encryptedResult = Kodium.encryptSymmetricToEncodedString(password, secretData)
// The result is a Result<String> containing the Base58 encoded ciphertext
val cipherTextString = encryptedResult.getOrThrow()Decrypting
Last updated