* removed the use of unit sockets

git-svn-id: trunk@5646 -
This commit is contained in:
ivost 2006-12-19 10:42:04 +00:00
parent 787ed7e230
commit 6a6c18b64a

View File

@ -21,7 +21,7 @@ interface
{$h+}
uses
SysUtils, DateUtils, md5, sockets;
SysUtils, DateUtils, md5;
@ -185,9 +185,9 @@ begin
(* put name space ID in network byte order so it hashes the same
no matter what endian machine we're on *)
net_nsid := nsid;
net_nsid.time_low := htonl(net_nsid.time_low);
net_nsid.time_mid := htons(net_nsid.time_mid);
net_nsid.time_hi_and_version := htons(net_nsid.time_hi_and_version);
// net_nsid.time_low := htonl(net_nsid.time_low);
// net_nsid.time_mid := htons(net_nsid.time_mid);
// net_nsid.time_hi_and_version := htons(net_nsid.time_hi_and_version);
MDInit(c, MD_VERSION_4);
MDUpdate(c, net_nsid, sizeof(net_nsid));
@ -202,17 +202,19 @@ end;
{ uuid_create_sha1_from_name }
procedure uuid_create_sha1_from_name(var uuid: uuid_t; const nsid: uuid_t; const name: string);
var
begin
end;
{var
net_nsid: uuid_t;
{ c: TMDContext;
hash: TMDDigest;}
c: TMDContext;
hash: TMDDigest;
begin
(* put name space ID in network byte order so it hashes the same
no matter what endian machine we're on *)
net_nsid := nsid;
net_nsid.time_low := htonl(net_nsid.time_low);
net_nsid.time_mid := htons(net_nsid.time_mid);
net_nsid.time_hi_and_version := htons(net_nsid.time_hi_and_version);
// net_nsid := nsid;
// net_nsid.time_low := htonl(net_nsid.time_low);
// net_nsid.time_mid := htons(net_nsid.time_mid);
// net_nsid.time_hi_and_version := htons(net_nsid.time_hi_and_version);
{SHAInit(c, SHA_VERSION_1);
SHAUpdate(c, net_nsid, sizeof(net_nsid));
@ -221,7 +223,7 @@ begin
(* the hash is in network byte order at this point *)
format_uuid_v3or5(uuid, @hash, UUID_VERSION_5);
end;
end;}
{ uuid_compare }
@ -281,9 +283,9 @@ procedure format_uuid_v3or5(var uuid: uuid_t; const hash: pointer; const v: inte
begin
(* convert UUID to local byte order *)
move(hash^, uuid, sizeof(uuid));
uuid.time_low := ntohl(uuid.time_low);
uuid.time_mid := ntohs(uuid.time_mid);
uuid.time_hi_and_version := ntohs(uuid.time_hi_and_version);
// uuid.time_low := ntohl(uuid.time_low);
// uuid.time_mid := ntohs(uuid.time_mid);
// uuid.time_hi_and_version := ntohs(uuid.time_hi_and_version);
(* put in the variant and version bits *)
uuid.time_hi_and_version := uuid.time_hi_and_version and $0FFF;