set

abstract fun set(key: String, value: String): SecureLocalStorageResult

Stores the given key-value pair in the secure storage.

This method saves a string value associated with the specified key in the secure local storage. Any existing value associated with the key will be replaced. The operation ensures the data is securely stored and retrieves the result of the operation.

Return

A SecureLocalStorageResult representing the result of the operation, which might be successful or contain an error.

Parameters

key

The key under which the value is to be stored.

value

The string value to be stored.


abstract fun set(key: String, value: ByteArray): SecureLocalStorageResult

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

The key is a string identifier associated with the provided value. The value is stored as a byte array and can be retrieved or updated later using the same key.

Return

A SecureLocalStorageResult indicating the success or failure of the operation.

Parameters

key

The string identifier used to store and retrieve the value.

value

The byte array data to be stored.


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

This method allows securely saving a String value associated with the specified KeyValueStorageKeys key. The storage mechanism ensures data confidentiality and integrity, adhering to secure storage practices.

Return

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

Parameters

key

The key of type KeyValueStorageKeys representing the storage key.

value

The value of type String to be stored securely.


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

Return

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

Parameters

key

The key under which the value should be stored. This must be an instance of KeyValueStorageKeys enum.

value

The integer value to be stored in the secure local storage.


Stores a Double value associated with the specified KeyValueStorageKeys.

This method securely saves a double precision floating-point number, linked to a predefined key class (KeyValueStorageKeys) in the underlying key-value storage system.

Return

A SecureLocalStorageResult which either indicates the success or failure of the operation.

Parameters

key

The predefined key (KeyValueStorageKeys) representing the storage identifier.

value

The double value to be stored in the key-value storage.


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

This method allows storing a floating-point value associated with a given key. The storage is performed securely, ensuring data integrity and protection.

Return

SecureLocalStorageResult indicating the outcome of the storage operation.

Parameters

key

The key of type KeyValueStorageKeys to associate with the value.

value

The floating-point value to be stored.


Stores a byte array value in the secure key-value storage associated with the given key.

Return

A SecureLocalStorageResult indicating the success or failure of the operation.

Parameters

key

The key used to store the value. It must be a valid instance of KeyValueStorageKeys.

value

The byte array value to be securely stored.