getWithResult
Retrieves the value associated with a key. This function uses a CompletableDeferred to handle the asynchronous callback and returns a Result object.
Return
A Result object containing the result of the operation.
Parameters
The key to retrieve the value for.
Retrieves the value associated with a key from secure storage using a CompletableDeferred and returns a Result. This suspending function encapsulates the asynchronous operation of retrieving a value and provides a structured way to handle both successful retrieval and potential errors. It uses a CompletableDeferred to manage the asynchronous result.
Return
A Result object containing the retrieved value (which can be null if the key is not found) or a SecureStorageError representing the error that occurred.
Parameters
The key to retrieve the value for.