Plugin.SecureStorage.SecureStorageImplementation.DeleteKey C# (CSharp) Method

DeleteKey() public method

Deletes the key and corresponding value from the storage
public DeleteKey ( string key ) : bool
key string
return bool
        public override bool DeleteKey(string key)
        {
            // valdiate using base class
            base.DeleteKey(key);

            // retrieve the entry
			KeyStore.SecretKeyEntry entry = GetSecretKeyEntry(key);

            // if entry exists, delete from store, save the store and return true
            if (entry != null)
            {
                _store.DeleteEntry(key);

                Save();

                return true;
            }

            return false;
        }