mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-15 20:54:58 +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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user