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
- Unit: uROEncryptionEnvelope.pas
- Ancestry: TComponent | TROComponent | TROMessageEnvelope | TROEncryptionEnvelope
constructor Create override
Standard component constructor
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
IntProcessIncoming protected override
If the Encryption is defined, the intProcessOutgoing procedure calls the Encrypt procedure of the TROEnvelopeMessageEncryption class, which encrypts the original Source message to the Dest cipher message given the Encryption options. Otherwise, the intProcessIncoming procedure calls the intProcessOutgoing procedure of the TROMessageEnvelope class, which copies the data from the Source to the Dest from the current position of the Source to the end. This procedure is virtual, so you can override it in the ancestor classes and call it before sending the message.
procedure IntProcessIncoming(Source: TStream; Dest: TStream; aMessage: IROMessage)
Parameters:
- Source: Original message
- Dest: Cipher message
- aMessage: Specified message
IntProcessOutgoing protected override
If the Encryption is defined, the intProcessOutgoing procedure calls the Encrypt procedure of the TROEnvelopeMessageEncryption class, which encrypts the original Source message to the Dest cipher message given the Encryption options. Otherwise, the intProcessIncoming procedure calls the intProcessOutgoing procedure of the TROMessageEnvelope class, which copies the data from the Source to the Dest from the current position of the Source to the end. This procedure is virtual, so you can override it in the ancestor classes and call it before sending the message.
procedure IntProcessOutgoing(Source: TStream; Dest: TStream; aMessage: IROMessage)
Parameters:
- Source: Original message
- Dest: Cipher message
- aMessage: Specified message
Notification protected override (declared in TROComponent)
Forwards notification messages to all owned components.
procedure Notification(aComponent: TComponent; Operation: TOperation)
Parameters:
- aComponent: component
- Operation: operation
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)
Encodes Source stream to Dest one.
function ProcessIncoming(aMessage: TROMessage; Source: TStream): TStream
Parameters:
- aMessage: outgoing message
- Source: stream
ProcessOutgoing (declared in TROMessageEnvelope)
Encodes Source stream to Dest one.
function ProcessOutgoing(aMessage: TROMessage; Dest: TStream): TStream
Parameters:
- aMessage: outgoing message
- Dest: 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 components.
procedure ROFreeNotification(aComponent: TComponent)
Parameters:
- aComponent: component
RORemoveFreeNotification (declared in TROComponent)
Forwards notification messages to all owned components.
procedure RORemoveFreeNotification(aComponent: TComponent)
Parameters:
- aComponent: component
SendRemoveNotification protected (declared in TROComponent)
Forwards notification messages to all owned components.
procedure SendRemoveNotification(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
Standard component constructor
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
IntProcessIncoming protected override
If the Encryption is defined, the intProcessOutgoing procedure calls the Encrypt procedure of the TROEnvelopeMessageEncryption class, which encrypts the original Source message to the Dest cipher message given the Encryption options. Otherwise, the intProcessIncoming procedure calls the intProcessOutgoing procedure of the TROMessageEnvelope class, which copies the data from the Source to the Dest from the current position of the Source to the end. This procedure is virtual, so you can override it in the ancestor classes and call it before sending the message.
procedure IntProcessIncoming(Source: TStream; Dest: TStream; aMessage: IROMessage)
Parameters:
- Source: Original message
- Dest: Cipher message
- aMessage: Specified message
IntProcessOutgoing protected override
If the Encryption is defined, the intProcessOutgoing procedure calls the Encrypt procedure of the TROEnvelopeMessageEncryption class, which encrypts the original Source message to the Dest cipher message given the Encryption options. Otherwise, the intProcessIncoming procedure calls the intProcessOutgoing procedure of the TROMessageEnvelope class, which copies the data from the Source to the Dest from the current position of the Source to the end. This procedure is virtual, so you can override it in the ancestor classes and call it before sending the message.
procedure IntProcessOutgoing(Source: TStream; Dest: TStream; aMessage: IROMessage)
Parameters:
- Source: Original message
- Dest: Cipher message
- aMessage: Specified message
Notification protected override (declared in TROComponent)
Forwards notification messages to all owned components.
procedure Notification(aComponent: TComponent; Operation: TOperation)
Parameters:
- aComponent: component
- Operation: operation
ProcessIncoming (declared in TROMessageEnvelope)
Encodes Source stream to Dest one.
function ProcessIncoming(aMessage: TROMessage; Source: TStream): TStream
Parameters:
- aMessage: outgoing message
- Source: stream
ProcessOutgoing (declared in TROMessageEnvelope)
Encodes Source stream to Dest one.
function ProcessOutgoing(aMessage: TROMessage; Dest: TStream): TStream
Parameters:
- aMessage: outgoing message
- Dest: stream
ROFreeNotification (declared in TROComponent)
Forwards notification messages to all owned components.
procedure ROFreeNotification(aComponent: TComponent)
Parameters:
- aComponent: component
RORemoveFreeNotification (declared in TROComponent)
Forwards notification messages to all owned components.
procedure RORemoveFreeNotification(aComponent: TComponent)
Parameters:
- aComponent: component
SendRemoveNotification protected (declared in TROComponent)
Forwards notification messages to all owned components.
procedure SendRemoveNotification(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)