Skip to content

myquay/GuidOne

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

GuidOne

.NET GUID Generation library behind the project http://guid.one

This library was built as a learning exercise to understand GUIDs - I've made the code available to anyone who is also interested under a permissive license.

This library implements the following GUID generation algorithms specified in RFC 4122

  • Version 1: Date-time and MAC address GUID
  • Version 3: MD5 hash & namespace
  • Version 4: Random
  • Version 5: HA-1 hash & namespace

Visit my blog for a 3-part series that dives into the secret world of GUIDs: https://michael-mckenna.com/tag/guid/

##Usage

var guidV1 = UUID.V1(); //Generate a V1 GUID for current time + random node
var guidV4 = UUID.V4(); //Generate a V4 GUID (random)
var guidV5 = UUID.V5(GuidNamespaces.DNS, "guid.one"); //Generate a V5 GUID for a particular domain

var guid = guidV4.AsGuid(); //Convert to a standard .NET Guid

Note: This library was created just to investigate the inner workings of GUIDs and is not considered production ready

About

.NET GUID Generation library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages