mirror of
https://github.com/Stone-Red-Code/RemSox.git
synced 2026-09-04 00:56:19 +02:00
Add XML summary to RNG plug, disable sleep in Desktop, null check update in Terminal
This commit is contained in:
@@ -3,10 +3,12 @@ using Cosmos.Build.API.Attributes;
|
|||||||
namespace RemSox.Plugs;
|
namespace RemSox.Plugs;
|
||||||
|
|
||||||
[Plug("System.Security.Cryptography.RandomNumberGeneratorImplementation")]
|
[Plug("System.Security.Cryptography.RandomNumberGeneratorImplementation")]
|
||||||
|
/// <summary>
|
||||||
|
/// Cryptographic stream generator based on ChaCha20.
|
||||||
|
/// Initial entropy is limited at boot; depends on hardware events (mouse & keyboard)
|
||||||
|
/// </summary>
|
||||||
public static unsafe class RandomNumberGeneratorImplementationImpl
|
public static unsafe class RandomNumberGeneratorImplementationImpl
|
||||||
{
|
{
|
||||||
// Cryptographic stream generator based on ChaCha20.
|
|
||||||
// Initial entropy is limited at boot; depends on hardware events.
|
|
||||||
private static readonly uint[] key = new uint[8];
|
private static readonly uint[] key = new uint[8];
|
||||||
private static readonly uint[] counter = new uint[4];
|
private static readonly uint[] counter = new uint[4];
|
||||||
private static readonly uint[] state = new uint[16];
|
private static readonly uint[] state = new uint[16];
|
||||||
@@ -15,8 +17,7 @@ public static unsafe class RandomNumberGeneratorImplementationImpl
|
|||||||
private static int entropyCounter;
|
private static int entropyCounter;
|
||||||
private static bool initialized = false;
|
private static bool initialized = false;
|
||||||
|
|
||||||
private static readonly uint[] constants =
|
private static readonly uint[] constants = [
|
||||||
[
|
|
||||||
0x61707865, 0x3320646E, 0x79622D32, 0x6B206574
|
0x61707865, 0x3320646E, 0x79622D32, 0x6B206574
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class DesktopProcess : Process
|
|||||||
WindowManager.Update();
|
WindowManager.Update();
|
||||||
|
|
||||||
// Sleep slightly to yield CPU to the main CLI thread (approx 60 FPS)
|
// Sleep slightly to yield CPU to the main CLI thread (approx 60 FPS)
|
||||||
Thread.Sleep(16);
|
//Thread.Sleep(16);
|
||||||
}
|
}
|
||||||
|
|
||||||
IsRunning = false;
|
IsRunning = false;
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ public class TerminalProcess : Process
|
|||||||
|
|
||||||
private void UpdateDisplay()
|
private void UpdateDisplay()
|
||||||
{
|
{
|
||||||
if (window == null)
|
if (window is null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user