IPWorks OpenPGP 2020 .NET Edition

Questions / Feedback?

KeyList Event

Fires for each key in the keyring when ListKeys is called.

Syntax

public event OnKeyListHandler OnKeyList;

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

public class KeymgrKeyListEventArgs : EventArgs {
  public string UserId { get; }
  public string KeyId { get; }
  public string Fingerprint { get; }
  public bool HasSecretKey { get; }
  public string PublicKeyAlgorithm { get; }
  public int PublicKeyLength { get; }
  public string Curve { get; }
}
Public Event OnKeyList As OnKeyListHandler

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

Public Class KeymgrKeyListEventArgs Inherits EventArgs
  Public ReadOnly Property UserId As String
  Public ReadOnly Property KeyId As String
  Public ReadOnly Property Fingerprint As String
  Public ReadOnly Property HasSecretKey As Boolean
  Public ReadOnly Property PublicKeyAlgorithm As String
  Public ReadOnly Property PublicKeyLength As Integer
  Public ReadOnly Property Curve As String
End Class

Remarks

This event fires once for each key in the Keyring when ListKeys is called.

UserId holds the current user Id of the key.

The UserId format is:

FirstName LastName (Comment) <Email>
Not all values are required when selecting or generating a key, but at least FirstName or Email are required.

KeyId is the hex-encoded, 4-byte or 8-byte Id of the key. It is the same as the last 4 or 8 bytes of the Fingerprint. For instance:

BF52A0AB

Fingerprint holds the hex-encoded, 20-byte fingerprint of the key. This is in the form:

5E70662EA810E768391A2FE8F7B7D49C89C9D7B1

HasSecretKey returns True if the key contains a secret key.

PublicKeyAlgorithm is the public key algorithm. Possible values are:

  • RSA
  • DSA
  • ECDSA
  • EdDSA

PublicKeyLength is the length of the public key. Common values are 512, 1024, and 2048. If the PublicKeyAlgorithm is ECDSA or EdDSA the length of the public key is determined by the Curve. Possible lengths are:

CurvePublic Key Length (bits)
secp256r1256
secp384r1384
secp521r1521
Ed25519 256
secp256k1256

Curve is the curve used by the key when PublicKeyAlgorithm is ECDSA or EdDSA. Possible values are:

ValuePublicKeyAlgorithmDescription
secp256r1 ECDSA NIST curve P-256
secp384r1 ECDSA NIST curve P-384
secp521r1 ECDSA NIST curve P-521
Ed25519 EdDSA Ed25519
secp256k1 EdDSA Secp256k1

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks OpenPGP 2020 .NET Edition - Version 20.0 [Build 8249]