Classe TDWDCP_cipher

Unit

Declaração

type TDWDCP_cipher = class(TComponent)

Descrição

Hierarquia

Visão Geral

Campos

Protected fInitialized: boolean;

Métodos

Protected procedure DeadInt(Value: integer);
Protected procedure DeadStr(Value: string);
Public class function GetId: integer; virtual;
Public class function GetAlgorithm: string; virtual;
Public class function GetMaxKeySize: integer; virtual;
Public class function SelfTest: boolean; virtual;
Public procedure Init(const Key; Size: longword; InitVector: pointer); virtual;
Public procedure InitStr(const Key: DWDCPRawString; HashType: TDWDCP_hashclass); overload;
Public procedure InitStr(const Key: DWDCPUnicodeString; HashType: TDWDCP_hashclass); overload;
Public procedure Burn; virtual;
Public procedure Reset; virtual;
Public procedure Encrypt(const Indata; var Outdata; Size: longword); virtual;
Public procedure Decrypt(const Indata; var Outdata; Size: longword); virtual;
Public function EncryptStream(InStream, OutStream: TStream; Size: longword): longword;
Public function DecryptStream(InStream, OutStream: TStream; Size: longword): longword;
Public function EncryptString(const Str: DWDCPRawString): DWDCPRawString; overload; virtual;
Public function DecryptString(const Str: DWDCPRawString): DWDCPRawString; overload; virtual;
Public function EncryptString(const Str: DWDCPUnicodeString): DWDCPUnicodeString; overload; virtual;
Public function DecryptString(const Str: DWDCPUnicodeString): DWDCPUnicodeString; overload; virtual;
Public function PartialEncryptStream(AStream: TMemoryStream; Size: longword) : longword;
Public function PartialDecryptStream(AStream: TMemoryStream; Size: longword) : longword;
Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;

Propriedades

Public property Initialized: boolean read fInitialized;
Published property Id: integer read _GetId write DeadInt;
Published property Algorithm: string read _GetAlgorithm write DeadStr;
Published property MaxKeySize: integer read _GetMaxKeySize write DeadInt;

Descrição

Campos

Protected fInitialized: boolean;
 

Métodos

Protected procedure DeadInt(Value: integer);

Whether or not the key setup has been done yet

Protected procedure DeadStr(Value: string);

Knudge to display vars in the object inspector

Public class function GetId: integer; virtual;
 
Public class function GetAlgorithm: string; virtual;

Get the algorithm id

Public class function GetMaxKeySize: integer; virtual;

Get the algorithm name

Public class function SelfTest: boolean; virtual;

Get the maximum key size (in bits)

Public procedure Init(const Key; Size: longword; InitVector: pointer); virtual;

Tests the implementation with several test vectors

Public procedure InitStr(const Key: DWDCPRawString; HashType: TDWDCP_hashclass); overload;

Do key setup based on the data in Key, size is in bits

Public procedure InitStr(const Key: DWDCPUnicodeString; HashType: TDWDCP_hashclass); overload;

Do key setup based on a hash of the key string

Public procedure Burn; virtual;

Do key setup based on a hash of the key string

Public procedure Reset; virtual;

Clear all stored key information

Public procedure Encrypt(const Indata; var Outdata; Size: longword); virtual;

Reset any stored chaining information

Public procedure Decrypt(const Indata; var Outdata; Size: longword); virtual;

Encrypt size bytes of data and place in Outdata

Public function EncryptStream(InStream, OutStream: TStream; Size: longword): longword;

Decrypt size bytes of data and place in Outdata

Public function DecryptStream(InStream, OutStream: TStream; Size: longword): longword;

Encrypt size bytes of data from InStream and place in OutStream

Public function EncryptString(const Str: DWDCPRawString): DWDCPRawString; overload; virtual;

Decrypt size bytes of data from InStream and place in OutStream

Public function DecryptString(const Str: DWDCPRawString): DWDCPRawString; overload; virtual;

Encrypt a string and return Base64 encoded

Public function EncryptString(const Str: DWDCPUnicodeString): DWDCPUnicodeString; overload; virtual;

Decrypt a Base64 encoded string

Public function DecryptString(const Str: DWDCPUnicodeString): DWDCPUnicodeString; overload; virtual;

Encrypt a Unicode string and return Base64 encoded

Public function PartialEncryptStream(AStream: TMemoryStream; Size: longword) : longword;

Decrypt a Base64 encoded Unicode string

Public function PartialDecryptStream(AStream: TMemoryStream; Size: longword) : longword;

Partially Encrypt up to 16K bytes of data in AStream

Public constructor Create(AOwner: TComponent); override;

Partially Decrypt up to 16K bytes of data in AStream

Public destructor Destroy; override;
 

Propriedades

Public property Initialized: boolean read fInitialized;
 
Published property Id: integer read _GetId write DeadInt;
 
Published property Algorithm: string read _GetAlgorithm write DeadStr;
 
Published property MaxKeySize: integer read _GetMaxKeySize write DeadInt;
 

Gerado por PasDoc 0.16.0.