static Task <string> PlatformGetAsync(string key) { if (string.IsNullOrWhiteSpace(key)) { throw new ArgumentNullException(nameof(key)); } var kc = new KeyChain(DefaultAccessible); var value = kc.ValueForKey(key, Alias); return(Task.FromResult(value)); }
public static Task SetAsync(string key, string value, SecAccessible accessible) { if (string.IsNullOrWhiteSpace(key)) { throw new ArgumentNullException(nameof(key)); } if (value == null) { throw new ArgumentNullException(nameof(value)); } var kc = new KeyChain(accessible); kc.SetValueForKey(value, key, Alias); return(Task.CompletedTask); }
static void PlatformRemoveAll() { var kc = new KeyChain(DefaultAccessible); kc.RemoveAll(Alias); }
static bool PlatformRemove(string key) { var kc = new KeyChain(DefaultAccessible); return(kc.Remove(key, Alias)); }
static Task <string> PlatformGetAsync(string key) { var kc = new KeyChain(); return(Task.FromResult(kc.ValueForKey(key, Alias))); }