private void DeleteKey() { using (NCryptStorageProvider provider = new NCryptStorageProvider(SelectProvider())) { using (NCryptKey key = provider.OpenKey(SelectKey(provider))) { key.Delete(); } } }
public Boolean DeleteKey(String keyName, Boolean machineKeyFlag = false) { NCryptKey key = OpenKey(keyName, machineKeyFlag); if (!(key is null)) { key.Delete(); return(true); } return(false); }