Magic: tMagic;
Alg: tCipherAlg;
Mode: tCipherMode;
Padding: tBlockPaddingMode;
NonceLen: Byte;
Nonce: array [0..15] of Byte;
Reserved: array [0..2] of Byte;
MsgCtrLen: Byte;
FirstMsgCtr: array [0..7] of Byte;
inherits from tStream
tEncryptStream provides uni-directional write access to a cipher text stream.
constructor Create(aDataStream: tStream; aCipher : iCipher);
destructor Destroy; override;
function Read(var Buffer; Count: Longint): Longint; override;
function Write(const Buffer; Count: Longint): Longint; override;
function WriteHeader(aRandomNonce: Boolean = False): Boolean;
function Seek(Offset: Longint; Origin: Word): Longint; override;
function SafeCopyFrom(aSource : TStream; aCount : Int64; const aBufSize : Integer = cDefaultBufSize; aWriteSize: Boolean = False) : Int64;
function SafeCopyFromWithSize(aSource : TStream; aCount : Int64; const aBufSize : Integer = cDefaultBufSize) : Int64;
function Done: Integer;
property Cipher: iCipher read fCipher write SetCipher;
property DataStream: tStream read fDataStream write SetDataStream;
inherits from TStream
tDecryptStream provides uni-directional read access to a cipher text stream.
constructor Create(aDataStream: tStream; aCipher : iCipher = nil);
constructor CreateOwnStream(aDataStream: tStream; aCipher : iCipher = nil; aSize : Int64 = 0);
destructor Destroy; override;
function Read(var Buffer; Count: Longint): Longint; override;
function Write(const Buffer; Count: Longint): Longint; override;
function ReadHeader(aKey: iSecretKey; var aCC: tCipherClass): Boolean; overload;
function ReadHeader(aKey: iSecretKey): Boolean; overload;
function Seek(Offset: Longint; Origin: Word): Longint; override;
function SafeCopyTo(aDest : TStream; aCount : Int64; const aBufSize : Integer = cDefaultBufSize; aReadSize: Boolean = False) : Int64;
function SafeCopyToWithSize(aDest : TStream; const aBufSize: Integer = cDefaultBufSize) : Int64;
function Done: Integer;
function GetInfo: tHeader;
property Cipher: iCipher read fCipher write SetCipher;
property DataStream: tStream read fDataStream write SetDataStream;
property Authenticated: Boolean read fAuthenticated;
property VerifyBeforeRelease: Boolean read fVerifyBeforeRelease write fVerifyBeforeRelease;