core / com.schibsted.account.persistence / LocalSecretsProvider

LocalSecretsProvider

class LocalSecretsProvider

Manages a mapping between randomly generated IDs and data. This allows for referring to data using a secret key while the actual data never leaves the device. Example usage: Redirect URIs

Constructors

<init>

LocalSecretsProvider(context: Context, maxEntries: Int = MAX_ENTRIES)

Manages a mapping between randomly generated IDs and data. This allows for referring to data using a secret key while the actual data never leaves the device. Example usage: Redirect URIs

Functions

get

fun get(secretKey: String): String?

Retrieves previously stored data from a generated key

put

fun put(value: String): String

Generates a random key for the value you provide and stores the value. If the value already exists, it will re-use the previously generated id.