Documentation for maplib/util/KeyStore.kt

fun encrypt(context: Context, plainStr: String, alias: String = "nextgis") : String

Encrypt String with key for given alias from Android KeyStore.

parameter context

required Context to init KeyStore.

parameter plainStr

String to encrypt.

parameter alias

optional alias for key to use from KeyStore.

fun decrypt(context: Context, encryptedStr: String, alias: String = "nextgis") : String

Decrypt encrypted String with key for given alias from Android KeyStore.

parameter context

required Context to init KeyStore.

parameter encryptedStr

encrypted String to decrypt.

parameter alias

optional alias for key to use from KeyStore.