|
@@ -24,6 +24,7 @@ resourcestring
|
|
// SInvalidHashSize = '"HashSize" Must Be Greater Than Zero';
|
|
// SInvalidHashSize = '"HashSize" Must Be Greater Than Zero';
|
|
SUnAssignedStream = 'Input Stream Is Unassigned';
|
|
SUnAssignedStream = 'Input Stream Is Unassigned';
|
|
SFileNotExist = 'Specified File Not Found';
|
|
SFileNotExist = 'Specified File Not Found';
|
|
|
|
+ SNotYetImplemented = 'Not Yet Implemented For "%s"';
|
|
|
|
|
|
type
|
|
type
|
|
THash = class abstract(TInterfacedObject, IHash)
|
|
THash = class abstract(TInterfacedObject, IHash)
|
|
@@ -77,6 +78,8 @@ type
|
|
procedure Initialize(); virtual; abstract;
|
|
procedure Initialize(); virtual; abstract;
|
|
function TransformFinal(): IHashResult; virtual; abstract;
|
|
function TransformFinal(): IHashResult; virtual; abstract;
|
|
|
|
|
|
|
|
+ function Clone(): IHash; virtual;
|
|
|
|
+
|
|
property BufferSize: Int32 read GetBufferSize write SetBufferSize;
|
|
property BufferSize: Int32 read GetBufferSize write SetBufferSize;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -230,6 +233,12 @@ begin
|
|
|
|
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+function THash.Clone(): IHash;
|
|
|
|
+begin
|
|
|
|
+ raise ENotImplementedHashLibException.CreateResFmt
|
|
|
|
+ (@SNotYetImplemented, [Name]);
|
|
|
|
+end;
|
|
|
|
+
|
|
function THash.ComputeBytes(const a_data: THashLibByteArray): IHashResult;
|
|
function THash.ComputeBytes(const a_data: THashLibByteArray): IHashResult;
|
|
begin
|
|
begin
|
|
Initialize();
|
|
Initialize();
|