X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/64005e4a670ae074eea1980c5eca131748884ec0..8bc22a17b97149d69fd377f5e9f5ed617a4385db:/lcorernd.pas?ds=sidebyside diff --git a/lcorernd.pas b/lcorernd.pas index b76ab49..b435305 100644 --- a/lcorernd.pas +++ b/lcorernd.pas @@ -4,7 +4,9 @@ ----------------------------------------------------------------------------- } unit lcorernd; - +{$ifdef fpc} + {$mode delphi} +{$endif} interface {$include lcoreconfig.inc} @@ -143,6 +145,13 @@ uses {$endif} {$endif} fastmd5,sysutils; +{$endif} + +const + wordsizeshift=2; + wordsize=1 shl wordsizeshift; + +{$ifndef nolcorernd} {$ifdef unix}{$include unixstuff.inc}{$endif} @@ -168,19 +177,17 @@ type hashtype=tmd5; const - wordsizeshift=2; - wordsize=1 shl wordsizeshift; //wordsize check commented out for d3 compatibility //{ $if (wordsize <> sizeof(wordtype))}'wordsizeshift must be setcorrectly'{ $ifend} hashsize=sizeof(hashtype); halfhashsize=hashsize div 2; hashdwords=hashsize div wordsize; pooldwords=3*hashdwords; - seeddwords=32; + seeddwords=40; hashpasssize=48; {this number has to be small enough that hashing this size uses only one block transform} var - {the seed part of this buffer must be at least as big as the OS seed (windows: 120 bytes, unix: 36 bytes)} + //the seed part of this buffer must be at least as big as the OS seed (windows: 120 bytes for 32 bits, 160 bytes for 64 bits, unix: 36 bytes) pool:array[0..(pooldwords+seeddwords-1)] of wordtype; reseedcountdown:integer;