mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-13 12:37:13 +00:00
feat: Added util method for generating seeded guids
This commit is contained in:
parent
88a4801f8e
commit
87d1f4da16
2 changed files with 18 additions and 0 deletions
17
ICD.Common.Utils/GuidUtils.cs
Normal file
17
ICD.Common.Utils/GuidUtils.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace ICD.Common.Utils
|
||||||
|
{
|
||||||
|
public static class GuidUtils
|
||||||
|
{
|
||||||
|
public static Guid GenerateSeeded(int seed)
|
||||||
|
{
|
||||||
|
Random seeded = new Random(seed);
|
||||||
|
byte[] bytes = new byte[16];
|
||||||
|
|
||||||
|
seeded.NextBytes(bytes);
|
||||||
|
|
||||||
|
return new Guid(bytes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -112,6 +112,7 @@
|
||||||
<Compile Include="Extensions\ParameterInfoExtensions.cs" />
|
<Compile Include="Extensions\ParameterInfoExtensions.cs" />
|
||||||
<Compile Include="Extensions\UriExtensions.cs" />
|
<Compile Include="Extensions\UriExtensions.cs" />
|
||||||
<Compile Include="Extensions\UShortExtensions.cs" />
|
<Compile Include="Extensions\UShortExtensions.cs" />
|
||||||
|
<Compile Include="GuidUtils.cs" />
|
||||||
<Compile Include="IcdUriBuilder.cs" />
|
<Compile Include="IcdUriBuilder.cs" />
|
||||||
<Compile Include="IO\Compression\IcdZipEntry.cs" />
|
<Compile Include="IO\Compression\IcdZipEntry.cs" />
|
||||||
<Compile Include="IO\IcdBinaryReader.cs" />
|
<Compile Include="IO\IcdBinaryReader.cs" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue