KeyList Event

Fires once for each key when listing keys.

Syntax

public event OnKeyListHandler OnKeyList;

public delegate void OnKeyListHandler(object sender, AzurekeysKeyListEventArgs e);

public class AzurekeysKeyListEventArgs : EventArgs {
  public string Name { get; }
  public string VersionId { get; }
  public string KeyType { get; }
  public string KeyOps { get; }
  public bool Enabled { get; }
  public long CreationDate { get; }
  public long UpdateDate { get; }
  public long DeletionDate { get; }
  public long PurgeDate { get; }
  public string PublicKey { get; }
}
Public Event OnKeyList As OnKeyListHandler

Public Delegate Sub OnKeyListHandler(sender As Object, e As AzurekeysKeyListEventArgs)

Public Class AzurekeysKeyListEventArgs Inherits EventArgs
  Public ReadOnly Property Name As String
  Public ReadOnly Property VersionId As String
  Public ReadOnly Property KeyType As String
  Public ReadOnly Property KeyOps As String
  Public ReadOnly Property Enabled As Boolean
  Public ReadOnly Property CreationDate As Long
  Public ReadOnly Property UpdateDate As Long
  Public ReadOnly Property DeletionDate As Long
  Public ReadOnly Property PurgeDate As Long
  Public ReadOnly Property PublicKey As String
End Class

Remarks

This event fires once for each key (or key version) returned when ListKeys, ListVersions, or GetKeyInfo is called. However, note that the KeyOps, KeyType, PublicKey, and (for ListKeys) VersionId parameters are not populated when one of the listing methods is called unless the IncludeKeyDetails property is enabled; refer to its documentation for more information.

Name reflects the name of the key.

VersionId reflects the Id of the key version.

KeyType reflects the key's type. Each key type has two variants, a software-based one and an HSM-based one. Possible values are shown in the first two columns of the following table:

Software-based HSM-based Description
EC_P256 EC_HSM_P256 The NIST P-256 curve (SECP256R1).
EC_P256K EC_HSM_P256K The SECP256K1 curve.
EC_P384 EC_HSM_P384 The NIST P-384 curve (SECP384R1).
EC_P521 EC_HSM_P521 The NIST P-521 curve (SECP521R1).
RSA_2048 RSA_HSM_2048 2048-bit RSA key.
RSA_3072 RSA_HSM_3072 3072-bit RSA key.
RSA_4096 RSA_HSM_4096 4096-bit RSA key.

KeyOps reflects a comma-separated list of operations that the key may be used for. Possible values are:

  • encrypt
  • decrypt
  • sign
  • verify
  • wrapKey
  • unwrapKey

Enabled reflects whether the key is currently enabled.

CreationDate reflects the key's creation date, in seconds since the Unix epoch.

UpdateDate reflects the key's update date, in seconds since the Unix epoch.

DeletionDate reflects the key's deletion date, in seconds since the Unix epoch, or -1 if the key has not been deleted.

PurgeDate reflects the key's purge (i.e., permanent deletion) date, in seconds since the Unix epoch, or -1 if the key has not been deleted.

PublicKey reflects the key's public key, in PEM format.

Copyright (c) 2022 /n software inc. - All rights reserved.
Cloud Keys 2020 .NET Edition - Version 20.0 [Build 8157]