public Task <string> GetAsync(string key) { if (string.IsNullOrWhiteSpace(key)) { throw new ArgumentNullException(nameof(key)); } var kc = new KeyChain(DefaultAccessible); var value = kc.ValueForKey(key); return(Task.FromResult(value)); }
// The always default choose the most secure user is comfy with public Task SetAsync(string key, string value) { if (string.IsNullOrWhiteSpace(key)) { throw new ArgumentNullException(nameof(key)); } if (value == null) { throw new ArgumentNullException(nameof(value)); } KeyChain kc = new KeyChain(DefaultAccessible); kc.SetValueForKey(value, key); return(Task.CompletedTask); }
public bool Remove(string key) { var kc = new KeyChain(DefaultAccessible); return(kc.Remove(key)); }