DeviceSecureStorage
Namespace: Wisej.Hybrid
Assembly: Wisej.Hybrid
Provides secure storage functionality for sensitive information on the device. This class allows for the storing, retrieving, and deleting of secure information.
- C#
- VB.NET
public class DeviceSecureStorage
Public Class DeviceSecureStorage
This class requires special setup. Access this class through the Device singleton. See: https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/storage/secure-storage for details.
Constructors
DeviceSecureStorage()
Initializes a new instance of DeviceSecureStorage.
Methods
Get(key)
Retrieves the securely stored value associated with the given key.
| Parameter | Type | Description |
|---|---|---|
| key | String | The key for the desired value. |
Returns: String. The value associated with the specified key if it exists; otherwise, null.
Remove(key)
Removes the securely stored value associated with the given key.
| Parameter | Type | Description |
|---|---|---|
| key | String | The key whose value should be removed. |
Returns: Boolean. true if the value was successfully removed; otherwise, false.
RemoveAll()
Removes all values stored in secure storage.
Set(key, value)
Stores a value securely under the given key.
| Parameter | Type | Description |
|---|---|---|
| key | String | The key under which to store the value. |
| value | String | The value to be stored. |