API Reference
stCustomProtoComp
stCustomProtoComp Unit
Classes, interfaces and records
interfaceiTransport
inherits from iBaseInterface
procedure Connect(aSocket: tSocket = 0);
procedure Close;
function RecvLength: Integer;
function Recv(const aBuffer: tBytes; aOffset, aCount : Integer; aBlock : Boolean = True) : Integer;
function Send(const aBuffer: tBytes; aOffset, aCount : Integer) : UInt32;
classeProtoInitError
inherits from Exception
(no public members)
classeProtoOptionInitError
inherits from eProtoInitError
constructor Create(const aOptionName: string);
classeProtoError
inherits from Exception
constructor Create(const aMessage : string; const aTransport: iTransport; aPos : Integer);
property Position: Integer read fPos;
property Transport: iTransport read fTransport;
classeProtoVersionError
inherits from eProtoError
constructor Create(const aVersion : string; const aTransport: iTransport);
classeInternalSendError
inherits from eProtoError
constructor CreateDefaultMsg(const aTransport: iTransport; aPos: Integer);
classeExternalSendError
inherits from eProtoError
constructor CreateDefaultMsg(const aTransport: iTransport; aPos: Integer);
classeInternalRecvError
inherits from eProtoError
constructor CreateDefaultMsg(const aTransport: iTransport; aPos: Integer);
classeExternalRecvError
inherits from eProtoError
constructor CreateDefaultMsg(const aTransport: iTransport; aPos: Integer);
interfaceiCustomOption
inherits from iBaseInterface
function GetEnabled: Boolean;
Getter for Enabled. An application would not normally call this directly; read the Enabled property instead.
property Enabled: Boolean read GetEnabled;
True once the unit implementing this option (e.g. a specific SSH cipher/KEX/MAC or key-storage backend) has run its initialization, which only happens if that unit is actually referenced from the project's uses clause.
Full description »
classtCustomOption
procedure SuggestRequiredUnits(aProc: tGetStringMethod); dynamic;
classtCustomOptionList
inherits from tPersistent
constructor Create(aOwner: tComponent);
Application code does not normally construct a tCustomOptionList directly; it is created internally by an owning TstCustomProtoComponent descendant (for example an SSH or PKIX component) to hold one algorithm/backend category, such as the set of SSH ciphers, KEX methods or key-storage backends offered by that component.
destructor Destroy; override;
Unregisters this list from its owning TstCustomProtoComponent, if any, before freeing the underlying option collections; not normally called directly by application code, which instead frees or lets the owner component free it.
procedure SuggestRequiredUnits(aProc: tGetStringMethod); dynamic;
Used by the IDE component editor (see stCustomProtoEditors.pas) to collect the names of units that must be added to a form's uses clause for the currently selected options (e.g. a chosen SSH cipher or key format) to actually be enabled; not typically called at run time by application code.
procedure SetSelectedOptionNames(const aNames: array of string); virtual;
Programmatic way to add selected options from code (e.g. which SSH ciphers, KEX methods or MAC algorithms a client or server component will offer).
Full description »
property AllOptionNames: string read GetAllOptionNames;
Comma-separated list of every option identifier registered for this list's RegisterModuleName that is currently Enabled (i.e. whose implementing unit is linked in); applications read this to discover which algorithms/backends (SSH ciphers, KEX methods, key-storage formats, etc.) are available to choose from, typically surfaced via the IDE property editor rather than read directly.
property SelectedOptionNames: string read GetSelOptionNames write SetSelOptionNames;
The subset of AllOptionNames an application has actually chosen to enable on this component (e.g. which SSH ciphers/KEX/MAC algorithms or key formats a client or server will offer/accept); set this at design time via the IDE option-list editor or at run time to restrict a component to a specific algorithm/backend set.
classTstBaseComponent
inherits from TComponent
Common root ancestor for StreamSec design-time components that do not need the option-list machinery of TstCustomProtoComponent (e.g. TstYarrow, TstRandomSeedAppEvent); application code interacts with it only through the descendant component actually dropped on a form, never directly.
constructor Create(aOwner: tComponent); override;
Standard tComponent construction; overridden here only as the anchor point other StreamSec components rely on, not something application code calls itself beyond the usual Create(Owner) component instantiation pattern.
» member page
procedure SuggestRequiredUnits(aProc: tGetStringMethod); dynamic;
Base (no-op) hook overridden by descendants to report units the IDE component editor should suggest adding to the form's uses clause; application code never calls this directly, it is invoked by stCustomProtoEditors.pas at design time.
» member page
classTstCustomProtoComponent
inherits from TstBaseComponent
constructor Create(aOwner: tComponent); override;
Standard component construction; also calls CreateOptionLists so that any descendant-specific option lists (e.g. an SSH component's cipher/KEX/MAC lists, or a PKIX message component's format options) exist as soon as the component is instantiated, both at design time and at run time.
» member page
destructor Destroy; override;
Frees the option lists created by CreateOptionLists; application code relies on this indirectly by simply freeing (or letting the form free) the owning SSH, PKIX message, SFTP or similar component.
» member page
procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;
Aggregates SuggestRequiredUnits across all of this component's option lists, so the IDE component editor can tell a developer which units to add to the uses clause for the algorithms/formats currently selected on an SSH, PKIX message, SFTP or similar descendant component; not called directly by application code.
» member page
Types (enumerations, sets, aliases)
typetSocket
tSocket = IntPtr;
proctSetKeyEvent
tSetKeyEvent = procedure (Sender : TObject;
const aTransport: iTransport;
const aKey : iUnknown;
var aOK : Boolean) of object;
proctGetStringMethod
tGetStringMethod = function (const S: string): Integer of object;
typetCustomOptionListClass
tCustomOptionListClass = class of tCustomOptionList;
proctVerifyProc
tVerifyProc = procedure (aCustNo: Integer; aInfo, aSign: Pointer; var aLicCount: Integer);
Routines