Secure Local Storage
A class that provides secure local storage functionalities with encryption and decryption, leveraging a DataStore<Preferences> for persistent key-value storage. This implementation ensures that data is securely saved and retrieved with cryptographic operations.
This class conforms to the KeyValueStorageInterface for standardized key-value storage operations.
Parameters
The DataStore instance for storing preferences.
SecureLocalStorage provides a platform-specific implementation for managing key-value storage securely. It extends KeyValueStorageInterface and ensures that stored data remains protected.
This class allows storing, retrieving, deleting, and managing key-value pairs, supporting multiple data types such as String, Int, Double, Float, and ByteArray. Additionally, it provides mechanisms for accessing storage status and performing operations in a secure manner.
This class requires platform-specific implementations to handle secure storage functionality and guarantees compatibility with the KeyValueStorageInterface.
Constructors
Functions
Deletes the value associated with the given key in the secure key-value storage.
Deletes a key-value pair from the secure local storage.
Deletes the value associated with the given key from the secure local storage.
Deletes the data associated with the provided key from the secure local storage.
Deletes all entries from the secure local storage.
Deletes all stored key-value entries in the secure local storage.
Delete multiple keys at once. Returns a list of results for each operation.
Checks if a specific key exists in the key-value storage.
Checks if the specified key exists in the secure local storage.
Check if all specified keys exist.
Check if any of the specified keys exist.
Retrieves a value associated with the provided key.
Retrieves the value associated with the given key from secure local storage.
Retrieves the corresponding value associated with the given key from the secure local storage.
Retrieves the value associated with the given key from the secure local storage.
Retrieves all key-value pairs stored in the secure local storage. The keys are represented as strings, and the values are of type Any.
Get a value as ByteArray or null if not found.
Get a value as Double or null if not found/invalid.
Get a value as Double with a default fallback.
Get a value as Float or null if not found/invalid.
Get a value as Float with a default fallback.
Get a value as Int or null if not found/invalid.
Get a value as Int with a default fallback.
Get a value as String or null if not found/invalid.
Get a value as String with a default fallback.
Stores a byte array value in the secure local storage associated with the specified key.
Stores a key-value pair in the secure local storage where the key is of type KeyValueStorageKeys and the value is a Double.
Stores a float value associated with a specific key in secure local storage.
Saves an integer value associated with the given key in the secure local storage.
Stores a key-value pair in the secure local storage.
Stores a byte array value in the secure local storage using the specified key.
Stores a value associated with the specified key in the secure local storage.
Stores a double value associated with a specific key in the secure local storage.
Stores a key-value pair in the secure local storage.
Stores an integer value in secure local storage corresponding to the given key.
Stores a string value in the secure local storage for the specified key.
Stores a value in the secure local storage using the given key.
Set multiple values at once. Returns a list of results for each operation.