EncryptionInfo Event
Reports early information on encryption parameters.
Syntax
public event OnEncryptionInfoHandler OnEncryptionInfo; public delegate void OnEncryptionInfoHandler(object sender, PgpreaderEncryptionInfoEventArgs e); public class PgpreaderEncryptionInfoEventArgs : EventArgs { public string KeyIDs { get; } public bool IntegrityProtected { get; } public bool PassphraseUsed { get; } }
Public Event OnEncryptionInfo As OnEncryptionInfoHandler Public Delegate Sub OnEncryptionInfoHandler(sender As Object, e As PgpreaderEncryptionInfoEventArgs) Public Class PgpreaderEncryptionInfoEventArgs Inherits EventArgs Public ReadOnly Property KeyIDs As String Public ReadOnly Property IntegrityProtected As Boolean Public ReadOnly Property PassphraseUsed As Boolean End Class
Remarks
The component fires this event to report early encryption information. Use this event to find out what encryption type is used, and to provide appropriate decryption material (the secret keys or the password) via DecryptingKeys or Passphrase properties.
KeyIDs contains the IDs of the keys that can be used to decrypt the data. PassphraseUsed shows if the message can also be decrypted with a passphrase. Both can be set at the same time, indicating that each of the decryption routes can be taken.
IntegrityProtected parameter specifies whether the message includes a modification detection record.