Discuss this help topic in SecureBlackbox Forum


TElPGPReader     See also     

Filter: C#/Java  VB.NET  Pascal  C++  PHP  

This event is fired when encrypted data is to be processed.


    event TSBPGPEncryptedEvent OnEncrypted;
    public delegate void TSBPGPEncryptedEvent(object Sender, byte[][] KeyIDs, bool IntegrityProtected, bool PassphraseUsed)

    Event OnEncrypted As TSBPGPEncryptedEvent
    Delegate Sub TSBPGPEncryptedEvent(ByVal Sender As Object, ByVal KeyIDs As Byte()(), ByVal IntegrityProtected As Boolean, ByVal PassphraseUsed As Boolean)

    property OnEncrypted : TSBPGPEncryptedEvent;
    TSBPGPEncryptedEvent = procedure(Sender: TObject; const KeyIDs : TSBKeyIDs; IntegrityProtected: boolean; PassphraseUsed: boolean) of object;
    TSBKeyIDs = array of TSBKeyID;
    TSBKeyID = array[0..7] of byte;

    void get_OnEncrypted(TSBPGPEncryptedEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnEncrypted(TSBPGPEncryptedEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TSBPGPEncryptedEvent)(void * _ObjectData, TObjectHandle Sender, const uint8_t pKeyIDs[][8], int32_t szKeyIDs, int8_t IntegrityProtected, int8_t PassphraseUsed);

    TSBPGPEncryptedEvent|callable|NULL get_OnEncrypted()
    void set_OnEncrypted(TSBPGPEncryptedEvent|callable|NULL $Value)
    callable TSBPGPEncryptedEvent(TObject $Sender, $KeyIDs, bool $IntegrityProtected, bool $PassphraseUsed)


  • KeyIDs - array containing identifiers of keys used for message encryption. If this parameter is empty, only password encryption was used.
  • PassphraseUsed - shows if the message was encrypted with password. If this parameter is True and KeyIDs is not empty, both password and public key-based encryption was implemented.
  • IntegrityProtected - shows if integrity checking code is included.
  • pKeyIDs -
  • szKeyIDs - the length of pcKeyIDs.


    This event is fired by TElPGPReader when it has to process encrypted data.
    Use KeyIDs parameter to find the key which is needed for decryption. Set decrypting key(s) as DecryptingKeys property inside this event handler.
    If message is encrypted using both passphrase and public key, the developer is allowed either to set an appropriate secret key in this event handler, or return a passphrase in OnPassphrase event handler. If an appropriate secret key is set in this event handler, the OnPassphrase event will not be fired.

See also:     OnArmored     OnCompressed     OnCreateOutputStream     OnKeyPassphrase     OnPassphrase     OnProgress     OnSigned    

Discuss this help topic in SecureBlackbox Forum