summary refs log tree commit diff stats
path: root/lib/pure/uuid.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-11-03 20:17:46 +0100
committerAraq <rumpf_a@web.de>2011-11-03 20:17:46 +0100
commitd819350145a66cea793c359a4782d3b137c17dd2 (patch)
treee24b0def9a6c590b299e1b5af385437a74d99d76 /lib/pure/uuid.nim
parent64e74cf4848d9a53074916b5705713855ab755db (diff)
downloadNim-d819350145a66cea793c359a4782d3b137c17dd2.tar.gz
bugfix: new GCC version requires -ldl to come after object files
Diffstat (limited to 'lib/pure/uuid.nim')
-rw-r--r--lib/pure/uuid.nim30
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/pure/uuid.nim b/lib/pure/uuid.nim
deleted file mode 100644
index 36fa9e445..000000000
--- a/lib/pure/uuid.nim
+++ /dev/null
@@ -1,30 +0,0 @@
-# This module implements the RFC 4122 specification for generating universally unique identifiers
-# http://en.wikipedia.org/wiki/Universally_unique_identifier
-
-# This module is a work-in-progress
-# If you want to help with the implementation, take a loot at:
-# http://dsource.org/projects/tango/docs/current/tango.util.uuid.Uuid.html
-
-type TUuid* = array[0..15, char]
-
-when defined(windows):
-  # This is actually available only on Windows 2000+
-  type PUuid* {.importc: "UUID __RPC_FAR *", header: "<Rpc.h>".} = ptr TUuid
-  proc uuid1Sys*(uuid: PUuid) {.importc: "UuidCreateSequential", header: "<Rpc.h>".}
-
-else:
-  type PUuid {.importc: "uuid_t", header: "<uuid/uuid.h>".} = ptr TUuid
-  proc uuid1Sys*(uuid: PUuid) {.importc: "uuid_generate_time", header: "<uuid/uuid.h>".}
-
-# v1 UUIDs include the MAC address of the machine generating the ID and a timestamp
-# This scheme has the strongest guaranty of uniqueness, but discloses when the ID was generated
-proc uuidMacTime* : TUuid = uuid1Sys(addr(result))
-
-# v4 UUID are created entirely using a random number generator.
-# Some bits have fixed value in order to indicate the UUID type
-proc uuidRandom*[RandomGenerator](rand: RandomGenerator) : TUuid = nil
-
-# v3 and v5 UUIDs are derived from given namespace and name using a secure hashing algorithm.
-# v3 uses MD5, v5 uses SHA1.
-proc uuidByName*[Hash](namespace: TUuid, name: string, hasher: Hash, v: int) : TUuid = nil
-