IPWorks OpenPGP 2020 .NET Edition

Questions / Feedback?

KeyPassphrase Event

Fired if the passphrase of current key is incorrect or empty.

Syntax

public event OnKeyPassphraseHandler OnKeyPassphrase;

public delegate void OnKeyPassphraseHandler(object sender, KeymgrKeyPassphraseEventArgs e);

public class KeymgrKeyPassphraseEventArgs : EventArgs {
  public string UserId { get; }
  public string KeyId { get; }
  public string Passphrase { get; set; }
}
Public Event OnKeyPassphrase As OnKeyPassphraseHandler

Public Delegate Sub OnKeyPassphraseHandler(sender As Object, e As KeymgrKeyPassphraseEventArgs)

Public Class KeymgrKeyPassphraseEventArgs Inherits EventArgs
  Public ReadOnly Property UserId As String
  Public ReadOnly Property KeyId As String
  Public Property Passphrase As String
End Class

Remarks

This event fires when the passphrase for the key is required. The passphrase must be specified before operations requiring the secret key are attempted. The passphrase may be supplied by setting the Passphrase parameter in this event, or by specifying the Passphrase field before attempting the operation.

The passphrase is required when using the following methods in KeyMgr:

When using the OpenPGP component, or an email-based component, the following methods require a passphrase for the key:

  • Decrypt
  • Sign
  • SignAndEncrypt

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