diff --git a/Directory.Build.props b/Directory.Build.props index 1a4e626..2a8d8ac 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -8,6 +8,9 @@ true true MIT + https://github.com/bgrainger/NGuid/ + https://github.com/bgrainger/NGuid/blob/master/ReleaseNotes.md + https://github.com/bgrainger/NGuid/blob/master/NGuid.png git https://github.com/bgrainger/NGuid.git embedded @@ -22,6 +25,8 @@ true true beta.0 + Bradley Grainger + Copyright 2023 Bradley Grainger diff --git a/NGuid.png b/NGuid.png new file mode 100644 index 0000000..2e20b13 Binary files /dev/null and b/NGuid.png differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..5ce16e2 --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# NGuid + +[![Continuous Integration](https://github.com/bgrainger/NGuid/actions/workflows/ci.yaml/badge.svg)](https://github.com/bgrainger/NGuid/actions/workflows/ci.yaml) + +## About + +NGuid provides efficient creation of name-based GUIDs according to [RFC4122](https://datatracker.ietf.org/doc/html/rfc4122): + +* Version 3 - created from an MD5 hash of a name +* Version 5 (default) - created from a SHA1 hash of a name + +## Usage + +```csharp +// returns a "Version 5" UUID by default: {74738ff5-5367-5958-9aee-98fffdcd1876} +var guid = GuidHelpers.CreateFromName(GuidHelpers.DnsNamespace, "www.example.org"u8); + +// can also create "Version 3": {0012416f-9eec-3ed4-a8b0-3bceecde1cd9} +var guidv3 = GuidHelpers.CreateFromName(GuidHelpers.DnsNamespace, "www.example.org"u8, version: 3); +``` + +## License + +[MIT](https://github.com/bgrainger/NGuid/blob/master/LICENSE) diff --git a/ReleaseNotes.md b/ReleaseNotes.md new file mode 100644 index 0000000..4779f48 --- /dev/null +++ b/ReleaseNotes.md @@ -0,0 +1,6 @@ +# Release Notes + +## 0.1.0 + +* First public release. +* Provide `GuidHelpers.CreateFromName` to create Version 3 and Version 5 UUIDs. diff --git a/src/NGuid/NGuid.csproj b/src/NGuid/NGuid.csproj index 068f506..547ce1e 100644 --- a/src/NGuid/NGuid.csproj +++ b/src/NGuid/NGuid.csproj @@ -1,7 +1,11 @@ - + netstandard2.0;net6.0;net8.0 + Creates GUIDs according to RFC4122. + README.md + guid;uuid;rfc4122 + NGuid.png @@ -11,4 +15,9 @@ + + + + + diff --git a/src/NGuid/README.md b/src/NGuid/README.md new file mode 100644 index 0000000..a190d02 --- /dev/null +++ b/src/NGuid/README.md @@ -0,0 +1,16 @@ +## NGuid + +NGuid provides efficient creation of name-based GUIDs according to [RFC4122](https://datatracker.ietf.org/doc/html/rfc4122): + +* Version 3 - created from an MD5 hash of a name +* Version 5 (default) - created from a SHA1 hash of a name + +## Usage + +```csharp +// returns a "Version 5" UUID by default: {74738ff5-5367-5958-9aee-98fffdcd1876} +var guid = GuidHelpers.CreateFromName(GuidHelpers.DnsNamespace, "www.example.org"u8); + +// can also create "Version 3": {0012416f-9eec-3ed4-a8b0-3bceecde1cd9} +var guidv3 = GuidHelpers.CreateFromName(GuidHelpers.DnsNamespace, "www.example.org"u8, version: 3); +```