DaanV2.UUID.Net 1.1.0

Install-Package DaanV2.UUID.Net -Version 1.1.0
dotnet add package DaanV2.UUID.Net --version 1.1.0
<PackageReference Include="DaanV2.UUID.Net" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DaanV2.UUID.Net --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DaanV2.UUID.Net, 1.1.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install DaanV2.UUID.Net as a Cake Addin
#addin nuget:?package=DaanV2.UUID.Net&version=1.1.0

// Install DaanV2.UUID.Net as a Cake Tool
#tool nuget:?package=DaanV2.UUID.Net&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

UUID.Net

Provides a base class that can handle UUIDs as an object and generators/factory to generate version 3, 4 and 5. Compliant with rfc4122.

Table of Contents

Implicit Casting

This API contains pre-made casting methods that convert UUID to strings, guids, char arrays or vice versa.

Usage Example

Below are two examples of generating UUIDs and usage

Generating UUIDs

Generate a UUID
UUID Temp = UUIDFactory.CreateUUID(4, 2); //Version 4, Variant 2
String UUID = UUIDFactory.CreateUUID(3, 1); //Version 3, Variant 1. auto cast to string
Generate a batch of UUIDs
UUID[] UUIDs = UUIDFactory.CreateUUIDs(100000, 4, 1); //Version 4, Variant 1, Amount of 100000
Generating through a Generator
IUUIDGenerator Generator = UUIDFactory.CreateGenerator(4, 1); //Get the version 4, variant 1 generator
IUUIDGenerator GeneratorV4 = new DaanV2.UUID.Generators.Version4.GeneratorVariant1(); //Get the version 4, variant 1 generator

UUID Out = GeneratorV4.Generate();

UUIDs Version

Version Variant Description Context Needed Context Type
3 1 A UUID generated from a string using MD5 hashing bits, 122 bits Yes String
4 1 A random generated UUID of 122 bits No Int32
4 2 A random generated UUID of 121 bits No Int32
5 1 A UUID generated from a string using SHA1 hashing bits, 122 bits Yes String

Performance

See Performance

  • .NETCore 5.0

    • No dependencies.
  • .NETCoreApp 3.1

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on DaanV2.UUID.Net:

Package Downloads
MiniJoyApp

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 1,281 12/13/2020
1.0.4 942 9/3/2020
1.0.3 433 4/7/2020
1.0.2 304 3/1/2020
1.0.1 403 1/25/2020
1.0.0 433 12/31/2019

Added Net5.0