DeleteKey Method
DeleteKey(KeyReference, Boolean)
Delete one (or more) keys matching the specified criteria.
C#
public void DeleteKey(KeyReference keyReference, bool deleteLast = false)
Parameters
Type | Name | Description |
---|---|---|
KeyReference | keyReference | A reference to the key(s) to delete. |
System.Boolean | deleteLast | Must be true if deleting the final key, false otherwise. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when both KID and KVN are 0, or when attempting to delete SCP03 keys by KID. |
SecureChannelException | Thrown when the delete operation fails. |
Remarks
All keys matching the given KID (Key ID) and/or KVN (Key Version Number) will be deleted, where 0 is treated as a wildcard. For SCP03 keys, they can only be deleted by KVN.