set

actual open override fun set(key: String, value: String): SecureLocalStorageResult

Stores a key-value pair in the secure local storage.

The value is encoded into a byte array before being saved securely.

Return

The result of the operation, wrapped in a SecureLocalStorageResult. This may represent success or an error during the operation.

Parameters

key

The key under which the value should be stored.

value

The value to store associated with the key.


actual open override fun set(key: String, value: ByteArray): SecureLocalStorageResult

Stores a byte array value in the secure local storage using the specified key.

Return

A SecureLocalStorageResult indicating the result of the operation. Returns SecureLocalStorageResult.Success if the data is stored successfully, otherwise SecureLocalStorageResult.Failure with the appropriate error.

Parameters

key

A string representing the unique key for the data.

value

The byte array data to be stored securely.


actual open override fun set(key: KeyValueStorageKeys, value: String): SecureLocalStorageResult

Stores a key-value pair in the secure local storage.

Return

A SecureLocalStorageResult indicating the success or failure of the operation.

Parameters

key

The key to store the value under, represented as a KeyValueStorageKeys enum.

value

The string value to store in the secure local storage.


actual open override fun set(key: KeyValueStorageKeys, value: Int): SecureLocalStorageResult

Saves an integer value associated with the given key in the secure local storage.

Return

A result indicating the success or failure of the operation.

Parameters

key

The key used to identify the stored value.

value

The integer value to save.


actual open override fun set(key: KeyValueStorageKeys, value: Double): SecureLocalStorageResult

Stores a key-value pair in the secure local storage where the key is of type KeyValueStorageKeys and the value is a Double.

Return

A SecureLocalStorageResult object indicating the success or failure of the storage operation.

Parameters

key

The key to store the value under. Must be of type KeyValueStorageKeys.

value

The value to be stored, represented as a Double.


actual open override fun set(key: KeyValueStorageKeys, value: Float): SecureLocalStorageResult

Stores a float value associated with a specific key in secure local storage.

Return

A SecureLocalStorageResult indicating the success or failure of the operation.

Parameters

key

The key of type KeyValueStorageKeys to associate with the value.

value

The float value to store in secure local storage.


actual open override fun set(key: KeyValueStorageKeys, value: ByteArray): SecureLocalStorageResult

Stores a byte array value in the secure local storage associated with the specified key.

Return

A SecureLocalStorageResult indicating the result of the storage operation. It will be either a SecureLocalStorageResult.Success or SecureLocalStorageResult.Failure.

Parameters

key

The key used to identify the value in the secure local storage. Must be of type KeyValueStorageKeys.

value

The byte array value to be stored in the secure local storage.

expect open override fun set(key: String, value: String): SecureLocalStorageResult

Stores a key-value pair in the secure local storage.

Return

A SecureLocalStorageResult indicating the success or failure of the operation.

Parameters

key

The key used to identify the value.

value

The value to be associated with the specified key.


expect open override fun set(key: String, value: ByteArray): SecureLocalStorageResult

Stores a value in the secure local storage using the given key.

This method allows storing binary data in the secure local storage. If the operation is successful, it returns a result indicating success. In case of failure, the result contains an appropriate error description.

Return

A SecureLocalStorageResult indicating the result of the operation, either success with optional data or failure with an associated error.

Parameters

key

The string key under which the value will be stored.

value

The binary data to be securely stored.


expect open override fun set(key: KeyValueStorageKeys, value: String): SecureLocalStorageResult

Stores a string value in the secure local storage for the specified key.

Return

A SecureLocalStorageResult indicating the success or failure of the operation.

Parameters

key

The key under which the value will be stored. This is defined by the KeyValueStorageKeys enum.

value

The string value to be stored corresponding to the specified key.


expect open override fun set(key: KeyValueStorageKeys, value: Int): SecureLocalStorageResult

Stores an integer value in secure local storage corresponding to the given key.

Return

A result indicating the success or failure of the storage operation. On success, contains optional data. On failure, contains an error.

Parameters

key

The key used to identify the value in the secure storage.

value

The integer value to be stored associated with the provided key.


expect open override fun set(key: KeyValueStorageKeys, value: Double): SecureLocalStorageResult

Stores a double value associated with a specific key in the secure local storage.

Return

A result indicating the success or failure of the storage operation.

Parameters

key

The key of type KeyValueStorageKeys to associate the value with.

value

The double value to be stored.


expect open override fun set(key: KeyValueStorageKeys, value: Float): SecureLocalStorageResult

Stores a key-value pair in the secure local storage.

Return

An instance of SecureLocalStorageResult indicating the success or failure of the operation.

Parameters

key

The key to associate with the given value in storage. Must be an instance of KeyValueStorageKeys.

value

The float value to be stored in association with the specified key.


expect open override fun set(key: KeyValueStorageKeys, value: ByteArray): SecureLocalStorageResult

Stores a value associated with the specified key in the secure local storage.

Return

A result object indicating the success or failure of the storage operation.

Parameters

key

The predefined key used to identify the value being stored.

value

The byte array to be stored in the secure local storage.