Discuss this help topic in SecureBlackbox Forum

TElMessagePartHandlerPGPMime.OnEncrypted

TElMessagePartHandlerPGPMime     See also     


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


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

Declaration

[C#]
    event TSBPGPEncryptedEvent OnEncrypted;
    delegate void TSBPGPEncryptedEvent(Object Sender, Byte[][] KeyIDs, bool IntegrityProtected, bool PassphraseUsed);

[VB.NET]
    Event OnEncrypted As TSBPGPEncryptedEvent
    Delegate Sub TSBPGPEncryptedEvent(ByVal Sender As Object, ByVal KeyIDs As Byte[][], ByVal IntegrityProtected As Boolean, ByVal PassphraseUsed As Boolean)

[Pascal]
    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;

[C++]
    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);

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

[Java]
    TSBPGPEncryptedEvent getOnEncrypted();
    void setOnEncrypted(TSBPGPEncryptedEvent Value);
    TSBPGPEncryptedEvent.Callback OnEncrypted = new TSBPGPEncryptedEvent.Callback() {
        public void TSBPGPEncryptedEventCallback(TObject Sender, byte[][] KeyIDs, boolean IntegrityProtected, boolean PassphraseUsed) {
            //...
        }
    }

Parameters

  • KeyIDs - array containing identifiers of keys used for message encryption.
  • IntegrityProtected - shows if integrity checking code is included.
  • PassphraseUsed - shows if message was encrypted using keys only (False) or password also (True).
  • pKeyIDs -
  • szKeyIDs - the length of pcKeyIDs.

Description

    This event is fired by TElMessagePartHandlerPGPMime when it has to process encrypted data.
    Use KeyIDs parameter to find these keys, combine them into keyring and set it as DecryptingKeys property inside this event handler.

See also:     OnEncryptingKeyNotFound    

Discuss this help topic in SecureBlackbox Forum