* Dotted filenames for package hash

This commit is contained in:
Michaël Van Canneyt 2023-03-06 14:58:03 +01:00
parent 19541da2ad
commit 077c661b2d
15 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,3 @@
unit System.Hash.Crc;
{$DEFINE FPC_DOTTEDUNITS}
{$i crc.pas}

View File

@ -0,0 +1,3 @@
unit System.Hash.Hmac;
{$DEFINE FPC_DOTTEDUNITS}
{$i hmac.pp}

View File

@ -0,0 +1,3 @@
unit System.Hash.Md5;
{$DEFINE FPC_DOTTEDUNITS}
{$i md5.pp}

View File

@ -0,0 +1,3 @@
unit System.Hash.Ntlm;
{$DEFINE FPC_DOTTEDUNITS}
{$i ntlm.pas}

View File

@ -0,0 +1,3 @@
unit System.Hash.Sha1;
{$DEFINE FPC_DOTTEDUNITS}
{$i sha1.pp}

View File

@ -0,0 +1,3 @@
unit System.Hash.Unixcrypt;
{$DEFINE FPC_DOTTEDUNITS}
{$i unixcrypt.pas}

View File

@ -0,0 +1,3 @@
unit System.Hash.Uuid;
{$DEFINE FPC_DOTTEDUNITS}
{$i uuid.pas}

View File

@ -0,0 +1,9 @@
src/crc.pas=namespaced/System.Hash.Crc.pas
{s*:src/}=namespaced/
{i+:src/}
src/sha1.pp=namespaced/System.Hash.Sha1.pp
src/unixcrypt.pas=namespaced/System.Hash.Unixcrypt.pas
src/uuid.pas=namespaced/System.Hash.Uuid.pas
src/ntlm.pas=namespaced/System.Hash.Ntlm.pas
src/hmac.pp=namespaced/System.Hash.Hmac.pp
src/md5.pp=namespaced/System.Hash.Md5.pp

View File

@ -1,4 +1,6 @@
{$IFNDEF FPC_DOTTEDUNITS}
unit crc; unit crc;
{$ENDIF FPC_DOTTEDUNITS}
{$mode objfpc} {$mode objfpc}

View File

@ -12,14 +12,21 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
} }
{$IFNDEF FPC_DOTTEDUNITS}
unit HMAC; unit HMAC;
{$ENDIF FPC_DOTTEDUNITS}
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
{$IFDEF FPC_DOTTEDUNITS}
uses
System.Hash.Md5, System.Hash.Sha1;
{$ELSE FPC_DOTTEDUNITS}
uses uses
MD5, SHA1; MD5, SHA1;
{$ENDIF FPC_DOTTEDUNITS}
type type
THMACMD5Digest = TMD5Digest; THMACMD5Digest = TMD5Digest;

View File

@ -49,7 +49,9 @@ documentation and/or software.
{$DEFINE MD5PASCAL} {$DEFINE MD5PASCAL}
{$endif darwin} {$endif darwin}
{$IFNDEF FPC_DOTTEDUNITS}
unit md5; unit md5;
{$ENDIF FPC_DOTTEDUNITS}
{$mode objfpc} {$mode objfpc}
{$inline on} {$inline on}
@ -189,7 +191,11 @@ function MD5Match(const Digest1, Digest2: TMD5Digest): Boolean; inline;
implementation implementation
{$IFDEF FPC_DOTTEDUNITS}
uses System.SysUtils;
{$ELSE FPC_DOTTEDUNITS}
uses sysutils; uses sysutils;
{$ENDIF FPC_DOTTEDUNITS}
// inverts the bytes of (Count div 4) cardinals from source to target. // inverts the bytes of (Count div 4) cardinals from source to target.
procedure Invert(Source, Dest: Pointer; Count: PtrUInt); procedure Invert(Source, Dest: Pointer; Count: PtrUInt);

View File

@ -13,14 +13,21 @@
**********************************************************************} **********************************************************************}
{$IFNDEF FPC_DOTTEDUNITS}
unit ntlm; unit ntlm;
{$ENDIF FPC_DOTTEDUNITS}
{$mode objfpc} {$mode objfpc}
interface interface
{$IFDEF FPC_DOTTEDUNITS}
uses
System.Math, System.Strings, System.Hash.Md5;
{$ELSE FPC_DOTTEDUNITS}
uses uses
Math, Strings, md5; Math, Strings, md5;
{$ENDIF FPC_DOTTEDUNITS}
function LMGenerate(const Password: PAnsiChar): TMDDigest; function LMGenerate(const Password: PAnsiChar): TMDDigest;

View File

@ -20,7 +20,9 @@
{$DEFINE SHA1PASCAL} {$DEFINE SHA1PASCAL}
{$endif} {$endif}
{$IFNDEF FPC_DOTTEDUNITS}
unit sha1; unit sha1;
{$ENDIF FPC_DOTTEDUNITS}
{$mode objfpc}{$h+} {$mode objfpc}{$h+}
interface interface
@ -51,7 +53,11 @@ function SHA1Match(const Digest1, Digest2: TSHA1Digest): Boolean;
implementation implementation
{$IFDEF FPC_DOTTEDUNITS}
uses System.SysUtils,System.SysConst;
{$ELSE FPC_DOTTEDUNITS}
uses sysutils,sysconst; uses sysutils,sysconst;
{$ENDIF FPC_DOTTEDUNITS}
// inverts the bytes of (Count div 4) cardinals from source to target. // inverts the bytes of (Count div 4) cardinals from source to target.
procedure Invert(Source, Dest: Pointer; Count: PtrUInt); procedure Invert(Source, Dest: Pointer; Count: PtrUInt);

View File

@ -1,4 +1,6 @@
{$IFNDEF FPC_DOTTEDUNITS}
unit unixcrypt; unit unixcrypt;
{$ENDIF FPC_DOTTEDUNITS}
{$mode objfpc} {$mode objfpc}
{$linklib crypt} {$linklib crypt}
@ -6,8 +8,13 @@ unit unixcrypt;
interface interface
{$IFDEF FPC_DOTTEDUNITS}
uses
System.CTypes;
{$ELSE FPC_DOTTEDUNITS}
uses uses
ctypes; ctypes;
{$ENDIF FPC_DOTTEDUNITS}
function crypt(const key: PAnsiChar; const salt: PAnsiChar): PAnsiChar; cdecl; external; function crypt(const key: PAnsiChar; const salt: PAnsiChar): PAnsiChar; cdecl; external;

View File

@ -13,15 +13,22 @@
**********************************************************************} **********************************************************************}
{$IFNDEF FPC_DOTTEDUNITS}
unit uuid; unit uuid;
{$ENDIF FPC_DOTTEDUNITS}
interface interface
{$mode objfpc} {$mode objfpc}
{$h+} {$h+}
{$IFDEF FPC_DOTTEDUNITS}
uses
System.SysUtils, System.DateUtils, System.Hash.Md5, System.Hash.Sha1;
{$ELSE FPC_DOTTEDUNITS}
uses uses
SysUtils, DateUtils, md5, sha1; SysUtils, DateUtils, md5, sha1;
{$ENDIF FPC_DOTTEDUNITS}