DaanV2.UUID.Net
2.0.3
See the version list below for details.
dotnet add package DaanV2.UUID.Net --version 2.0.3
NuGet\Install-Package DaanV2.UUID.Net -Version 2.0.3
<PackageReference Include="DaanV2.UUID.Net" Version="2.0.3" />
paket add DaanV2.UUID.Net --version 2.0.3
#r "nuget: DaanV2.UUID.Net, 2.0.3"
// Install DaanV2.UUID.Net as a Cake Addin #addin nuget:?package=DaanV2.UUID.Net&version=2.0.3 // Install DaanV2.UUID.Net as a Cake Tool #tool nuget:?package=DaanV2.UUID.Net&version=2.0.3
UUID.Net
A library that provides a way to handle, and generate UUIDs. Convert them to and from strings, GUIDs, and the like. The library is written to be fast and efficient when comparing, generating or other handling operations. But still, comply with the RFC 4122 standard. As well as providing a way to generate UUIDs from different data, like a string, or a byte array. Or cutting up a byte array into UUIDs.
Also has support for JSON serialization.
Usage Example
Below are two examples of generating UUIDs and usage
Generating UUIDs
Most versions of UUIDs can be generated using the static methods in the DaanV2.UUID.V4
or other respective classes.
Since most of the UUIDs are generated from different data, different overloads are available.
//Single UUID
var uuid = DaanV2.UUID.V4.Generate();
uuid = DaanV2.UUID.V1.Generate();
//Batch of UUIDs
var uuids = DaanV2.UUID.V4.Batch(1000);
//Chunk an byte array into UUIDs
Byte[] data = ...
var uuids = DaanV2.UUID.V4.Batch(data);
Creating UUIDs
In case you want to provide your own data to generate a UUID, you can use the DaanV2.UUID.UUID
class.
This will stamp the UUID with the provided data, and use the provided data to generate the UUID.
using DaanV2.UUID;
Byte[] data = ...
var uuid = UUID.Create(Version.V4, Variant.V1, data)
UUIDs Version
Version | Variant | Description |
---|---|---|
1 | 1 | A UUID generated from a timestamp and the macaddresss |
3 | 1 | A UUID generated from a string using MD5 hashing bits, 122 bits |
4 | 1 | A random generated UUID of 122 bits |
5 | 1 | A UUID generated from a string using SHA1 hashing bits, 122 bits |
Benchmarks
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- 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 | |
---|---|---|---|
2.4.0 | 487 | 11/2/2024 | |
2.3.2 | 2,076 | 8/24/2024 | |
2.3.1 | 331 | 2/6/2024 | |
2.3.0 | 109 | 2/4/2024 | |
2.2.0 | 206 | 2/3/2024 | |
2.1.0 | 1,016 | 12/24/2023 | |
2.0.10 | 430 | 6/30/2023 | |
2.0.8 | 237 | 6/18/2023 | |
2.0.3 | 325 | 6/3/2023 | |
2.0.2 | 239 | 6/1/2023 | |
2.0.1 | 227 | 5/28/2023 | |
2.0.0 | 217 | 5/28/2023 | |
1.1.0 | 66,762 | 12/13/2020 | |
1.0.4 | 1,545 | 9/3/2020 | |
1.0.3 | 820 | 4/7/2020 | |
1.0.2 | 687 | 3/1/2020 | |
1.0.1 | 813 | 1/25/2020 | |
1.0.0 | 820 | 12/31/2019 |