Advertisement
Guest User

ICNSecureStorage

a guest
Feb 26th, 2025
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 KB | None | 0 0
  1. public interface ICNSecureStorage
  2. {
  3.     /// <summary>
  4.     /// Gets and decrypts the value for a given key.
  5.     /// </summary>
  6.     /// <param name="key">The key to retrieve the value for.</param>
  7.     /// <returns>The decrypted string value or <see langword="null"/> if a value was not found.</returns>
  8.     Task<string?> GetAsync(string key);
  9.  
  10.     /// <summary>
  11.     /// Sets and encrypts a value for a given key.
  12.     /// </summary>
  13.     /// <param name="key">The key to set the value for.</param>
  14.     /// <param name="value">Value to set.</param>
  15.     /// <returns>A <see cref="Task"/> object with the current status of the asynchronous operation.</returns>
  16.     Task SetAsync(string key, string value);
  17.  
  18.     /// <summary>
  19.     /// Removes a key and its associated value if it exists.
  20.     /// </summary>
  21.     /// <param name="key">The key to remove.</param>
  22.     bool Remove(string key);
  23.  
  24.     /// <summary>
  25.     /// Removes all of the stored encrypted key/value pairs.
  26.     /// </summary>
  27.     void RemoveAll();
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement