Show / Hide Table of Contents

DeleteKey Method

DeleteKey(KeyReference, bool)

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.

bool deleteLast

Must be true if deleting the final key, false otherwise.

Exceptions

Type Condition
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.

In this article
Back to top Generated by DocFX