mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-07 16:55:08 +00:00
feat: Added util method for generating seeded guids
This commit is contained in:
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\UriExtensions.cs" />
|
||||
<Compile Include="Extensions\UShortExtensions.cs" />
|
||||
<Compile Include="GuidUtils.cs" />
|
||||
<Compile Include="IcdUriBuilder.cs" />
|
||||
<Compile Include="IO\Compression\IcdZipEntry.cs" />
|
||||
<Compile Include="IO\IcdBinaryReader.cs" />
|
||||
|
||||
Reference in New Issue
Block a user