* 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;
{$ENDIF FPC_DOTTEDUNITS}
{$mode objfpc}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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