Browse Source

Merge branch 'master' of https://github.com/PascalCoin/PascalCoin

PascalCoin 6 years ago
parent
commit
c410279592

+ 2 - 2
src/libraries/hashlib4pascal/HlpHash.pas

@@ -34,6 +34,8 @@ type
   const
     BUFFER_SIZE = Int32(64 * 1024); // 64Kb
 
+  strict protected
+
     function GetBlockSize: Int32; virtual;
     procedure SetBlockSize(value: Int32); virtual;
 
@@ -43,8 +45,6 @@ type
     function GetBufferSize: Int32; inline;
     procedure SetBufferSize(value: Int32); inline;
 
-  strict protected
-
     function GetName: String; virtual;
 
   public

+ 1 - 1
src/libraries/hashlib4pascal/HlpHashBuffer.pas

@@ -18,7 +18,7 @@ resourcestring
 type
   THashBuffer = record
 
-  strict private
+  private
 
     Fm_data: THashLibByteArray;
     Fm_pos: Int32;

+ 3 - 3
src/libraries/hashlib4pascal/HlpSnefru.pas

@@ -48,7 +48,7 @@ type
 
     class constructor Snefru();
 
-    function GetHashSize(AHashSize: Int32): THashSize; inline;
+    function GetSnefruHashSize(AHashSize: Int32): THashSize; inline;
 
   strict protected
     function GetName: String; override;
@@ -74,7 +74,7 @@ implementation
 
 { TSnefru }
 
-function TSnefru.GetHashSize(AHashSize: Int32): THashSize;
+function TSnefru.GetSnefruHashSize(AHashSize: Int32): THashSize;
 begin
   case AHashSize of
     16:
@@ -93,7 +93,7 @@ function TSnefru.Clone(): IHash;
 var
   HashInstance: TSnefru;
 begin
-  HashInstance := TSnefru.Create(Fm_security_level, GetHashSize(FHashSize));
+  HashInstance := TSnefru.Create(Fm_security_level, GetSnefruHashSize(FHashSize));
   HashInstance.Fm_state := System.Copy(Fm_state);
   HashInstance.Fm_buffer := Fm_buffer.Clone();
   HashInstance.Fm_processed_bytes := Fm_processed_bytes;