TROEncryptionEnvelope

Overview

The TROEncryptionEnvelope class is the part of RO Envelopes technology that allows to change incoming and outgoing messages according to user needs. Envelopes work by providing custom wrappers around the message; the encryption envelope is a pretty good example of using the RO Envelope approach.

The TROEncryptionEnvelope class uses RODEC (old-fashioned RO encryption that is incompatible with the encryption used on the .NET side) while the TROAESEncryptionEnvelope component uses DEC v5.x and .NET compatible AES encryption.

You can use the TROEncryptionEnvelope object to encrypt specified messages. To tie up the message and the TROEncryptionEnvelope object, you should use the message collection Envelopes and hook the items of the collection Envelopes with the TROEncryptionEnvelope object. The most important properties of the TROEncryptionEnvelope object are: the encryption method (the different kinds of encryption are declared in the TROEncryptionMethod enum), encryption send and receive keys and the UseCompression property, which determines whether the encrypted messages will be compressed. To tie up the encrypted messages on server and client side, the EnvelopeMarker property should be the same on both sides.

Location

 

constructor Create  override

Creates a new instance.

constructor Create(aOwner: TComponent)

Parameters:

  • aOwner: Owner.

Assign  override

Copies the contents of another, similar object.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

Encryption  deprecated

Represents the TROEnvelopeMessageEncryption object that encrypts and decrypts the specified messages of the current TROEncryptionEnvelope object. Contains the following information about the encryption method: EncryptionMethod (see the TROEncryptionMethod enum for all available encryption methods), EncryptionSendKey, EncryptionRecvKey and UseCompression (a boolean value that determines whether compression will be used with the encrypted messages). This information is contained in the visual properties of the current TROEncryptionEnvelope object.

property Encryption: TROEnvelopeMessageEncryption read write

EnvelopeMarker    (declared in TROMessageEnvelope)

This text mark can be used to distinguish envelopes.

property EnvelopeMarker: string read write

GetDefaultEnvelopeMarker  protected virtual    (declared in TROMessageEnvelope)

Returns EnvelopeMarker used by default.

function GetDefaultEnvelopeMarker: string

OnAfterEnvelopeProcessed    (declared in TROMessageEnvelope)

Fires after processing of envelope

property OnAfterEnvelopeProcessed: TROMessageEnvelopeProcessed read write
delegate: procedure OnAfterEnvelopeProcessed(AMessageEnvelope: TROMessageEnvelope; AStream: TStream; aMode: TROMessageEnvelopeMode; AMessage: IROMessage)

OnBeforeEnvelopeProcessed    (declared in TROMessageEnvelope)

Fires before processing of envelope

property OnBeforeEnvelopeProcessed: TROMessageEnvelopeProcessed read write
delegate: procedure OnBeforeEnvelopeProcessed(AMessageEnvelope: TROMessageEnvelope; AStream: TStream; aMode: TROMessageEnvelopeMode; AMessage: IROMessage)

ProcessIncoming    (declared in TROMessageEnvelope)

Defines the processing of an incoming message.

function ProcessIncoming(aMessage: TROMessage; aStream: TStream): TStream

Parameters:

  • aMessage: incoming message
  • aStream: encoded stream

ProcessOutgoing    (declared in TROMessageEnvelope)

Defines the processing of an outgoing message.

function ProcessOutgoing(aMessage: TROMessage; aStream: TStream): TStream

Parameters:

  • aMessage: outgoing message
  • aStream: stream

ReuseOriginalStream  protected    (declared in TROMessageEnvelope)

Allows to reuse original stream

property ReuseOriginalStream: boolean read write

ROFreeNotification    (declared in TROComponent)

Forwards notification messages to all owned RO components.

procedure ROFreeNotification(AComponent: TComponent)

Parameters:

  • AComponent: component

RORemoveFreeNotification    (declared in TROComponent)

Disables destruction notification for specified RO component.

procedure RORemoveFreeNotification(AComponent: TComponent)

Parameters:

  • AComponent: component

 

Encryption  deprecated

Represents the TROEnvelopeMessageEncryption object that encrypts and decrypts the specified messages of the current TROEncryptionEnvelope object. Contains the following information about the encryption method: EncryptionMethod (see the TROEncryptionMethod enum for all available encryption methods), EncryptionSendKey, EncryptionRecvKey and UseCompression (a boolean value that determines whether compression will be used with the encrypted messages). This information is contained in the visual properties of the current TROEncryptionEnvelope object.

property Encryption: TROEnvelopeMessageEncryption read write

EnvelopeMarker    (declared in TROMessageEnvelope)

This text mark can be used to distinguish envelopes.

property EnvelopeMarker: string read write

ReuseOriginalStream  protected    (declared in TROMessageEnvelope)

Allows to reuse original stream

property ReuseOriginalStream: boolean read write

 

constructor Create  override

Creates a new instance.

constructor Create(aOwner: TComponent)

Parameters:

  • aOwner: Owner.

Assign  override

Copies the contents of another, similar object.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

GetDefaultEnvelopeMarker  protected virtual    (declared in TROMessageEnvelope)

Returns EnvelopeMarker used by default.

function GetDefaultEnvelopeMarker: string

ProcessIncoming    (declared in TROMessageEnvelope)

Defines the processing of an incoming message.

function ProcessIncoming(aMessage: TROMessage; aStream: TStream): TStream

Parameters:

  • aMessage: incoming message
  • aStream: encoded stream

ProcessOutgoing    (declared in TROMessageEnvelope)

Defines the processing of an outgoing message.

function ProcessOutgoing(aMessage: TROMessage; aStream: TStream): TStream

Parameters:

  • aMessage: outgoing message
  • aStream: stream

ROFreeNotification    (declared in TROComponent)

Forwards notification messages to all owned RO components.

procedure ROFreeNotification(AComponent: TComponent)

Parameters:

  • AComponent: component

RORemoveFreeNotification    (declared in TROComponent)

Disables destruction notification for specified RO component.

procedure RORemoveFreeNotification(AComponent: TComponent)

Parameters:

  • AComponent: component

 

OnAfterEnvelopeProcessed    (declared in TROMessageEnvelope)

Fires after processing of envelope

property OnAfterEnvelopeProcessed: TROMessageEnvelopeProcessed read write
delegate: procedure OnAfterEnvelopeProcessed(AMessageEnvelope: TROMessageEnvelope; AStream: TStream; aMode: TROMessageEnvelopeMode; AMessage: IROMessage)

OnBeforeEnvelopeProcessed    (declared in TROMessageEnvelope)

Fires before processing of envelope

property OnBeforeEnvelopeProcessed: TROMessageEnvelopeProcessed read write
delegate: procedure OnBeforeEnvelopeProcessed(AMessageEnvelope: TROMessageEnvelope; AStream: TStream; aMode: TROMessageEnvelopeMode; AMessage: IROMessage)

See Also