mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-25 21:12:04 +00:00
21 lines
498 B
C#
21 lines
498 B
C#
using System;
|
|
|
|
using IL2CPU.API.Attribs;
|
|
|
|
namespace Cosmos.Core_Plugs.System
|
|
{
|
|
[Plug("System.Marvin, System.Private.CoreLib")]
|
|
public static class MarvinImpl
|
|
{
|
|
// todo: maybe plug this at the RandomNumberGeneratorImplementation level
|
|
public static ulong GenerateSeed()
|
|
{
|
|
var random = new Random();
|
|
var buffer = new byte[8];
|
|
|
|
random.NextBytes(buffer);
|
|
|
|
return BitConverter.ToUInt64(buffer, 0);
|
|
}
|
|
}
|
|
}
|