24 #include <sys/types.h>
27 #include <openssl/md5.h>
30 #include <arpa/inet.h>
42 unsigned char hash[16];
43 Uuid net_nsid =
clone(nsid);
44 Uuid uuid =
new(Uuid);
49 (net_nsid->uuid).elements.time_low =
50 htonl((net_nsid->uuid).elements.time_low);
51 (net_nsid->uuid).elements.time_mid =
52 htons((net_nsid->uuid).elements.time_mid);
53 (net_nsid->uuid).elements.time_hi_version =
54 htons((net_nsid->uuid).elements.time_hi_version);
60 MD5_Update(&ctx, (net_nsid->uuid).value, 16);
61 MD5_Update(&ctx, name, nname);
62 MD5_Final(hash, &ctx);
Uuid uuidVersion3(const unsigned char *name, size_t nname, Uuid nsid)
void _uuidFormat3or5(Uuid uuid, unsigned char hash[16], int version)