save

fun <T> save(context: Context, key: String, value: T)

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

Parameters

T

The type of the value to store.

context

The Android context used to access encrypted storage.

key

The storage key under which the value is saved.

value

The value to serialize and persist.