summaryrefslogtreecommitdiff
path: root/plugins/HistoryPlusPlus/Checksum.pas
diff options
context:
space:
mode:
authorAlexey Kulakov <panda75@bk.ru>2012-07-13 12:05:09 +0000
committerAlexey Kulakov <panda75@bk.ru>2012-07-13 12:05:09 +0000
commita79fa86ed589c3d843baa932230ef08bc7468296 (patch)
tree98339a8ea73acfffbea00ca607c6525e89657ac6 /plugins/HistoryPlusPlus/Checksum.pas
parenta87fb51fd8597af4909892f0e12010594e935586 (diff)
partial code beautifier (through Pascal Analizer)
git-svn-id: http://svn.miranda-ng.org/main/trunk@947 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HistoryPlusPlus/Checksum.pas')
-rw-r--r--plugins/HistoryPlusPlus/Checksum.pas13
1 files changed, 8 insertions, 5 deletions
diff --git a/plugins/HistoryPlusPlus/Checksum.pas b/plugins/HistoryPlusPlus/Checksum.pas
index dab601641a..47ab3245c9 100644
--- a/plugins/HistoryPlusPlus/Checksum.pas
+++ b/plugins/HistoryPlusPlus/Checksum.pas
@@ -38,20 +38,20 @@ unit Checksum;
interface
-uses SysUtils, Windows, Base64;
+uses windows;
type
TDig64 = array[0..1] of DWord;
function DigToBase(Digest: TDig64): AnsiString;
-function BaseToDig(Str: AnsiString): TDig64;
+function BaseToDig(const Str: AnsiString): TDig64;
//function StrToDig(Str: AnsiString): TDig64;
function DigToStr(Digest: TDig64): AnsiString;
function SameDigest(Dig1,Dig2: TDig64): Boolean;
procedure CalcCRC32(Data: Pointer; DataSize: DWord; var CRCValue: DWord);
//function CRC32(CRC: DWord; Data: Pointer; DataSize: DWord): LongWord; assembler;
//function CRC32a(CRC: DWord; Data: Pointer; DataSize: DWord): DWord;
-function HashString(Str: AnsiString): TDig64;
+function HashString(const Str: AnsiString): TDig64;
procedure CalcSampleHash(const Data: Pointer; DataSize: Integer; var Digest: TDig64);
var
@@ -59,6 +59,9 @@ var
implementation
+uses
+ SysUtils, Base64;
+
const
DIGEST_DIV = '-';
const
@@ -74,7 +77,7 @@ begin
Result := Base64EncodeStr(DigStr);
end;
-function BaseToDig(Str: AnsiString): TDig64;
+function BaseToDig(const Str: AnsiString): TDig64;
var
DigStr: AnsiString;
begin
@@ -82,7 +85,7 @@ begin
Move(DigStr[1], Result, SizeOf(Result));
end;
-function HashString(Str: AnsiString): TDig64;
+function HashString(const Str: AnsiString): TDig64;
begin
Result := ZeroDig;
Result[0] := InitCRC;