SecureConfigurationStorage

Provides encrypted persistent storage for SDK configuration values using EncryptedSharedPreferences backed by AES256-GCM keys.

All values are serialized to JSON before encryption and deserialized on retrieval, so any serializable type can be stored.

Functions

Link copied to clipboard
fun getRaw(context: Context, key: String): String?

Reads the raw encrypted JSON string stored under key without deserializing it.

Link copied to clipboard

Returns an EncryptedSharedPreferences instance backed by an AES256-GCM master key.

Link copied to clipboard
fun remove(context: Context, key: String)

Removes the entry stored under key from encrypted storage.

Link copied to clipboard
inline fun <T> retrieve(context: Context, key: String): T?

Reads and deserializes the value stored under key into type T.

Link copied to clipboard
fun <T> save(context: Context, key: String, value: T)

Serializes value to JSON and writes it to encrypted storage under key.