This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
public class ArrayMixer | |
{ | |
private readonly SHA3ModInt _alg; | |
private readonly int _moveSize; | |
public ArrayMixer(int hashSize = 256) | |
{ | |
_alg = new SHA3ModInt(hashSize); | |
_moveSize = _alg.ComputeHash(2.GetBytes()).Length; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
/// <summary> | |
/// Contains native Windows and SetupDi API calls | |
/// </summary> | |
public class NativeWin32 | |
{ | |
[Flags] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using System.Security.Cryptography; | |
using System.Threading; | |
public class RngJitterSource : RandomNumberGenerator | |
{ | |
/// <summary> | |
/// Recalculate buffer every 1000 milliseconds | |
/// </summary> | |
private const int ReSecureThresholdBf = 1000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Drawing; | |
using System.Drawing.Drawing2D; | |
using System.Drawing.Imaging; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Windows.Forms; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Drawing; | |
using System.Drawing.Imaging; | |
public unsafe class MemoryBitmap : IDisposable | |
{ | |
private readonly BitmapData _bmpData; | |
private readonly int _depth; | |
private readonly Bitmap _memoryBitmap; | |
private readonly byte* _pfp; | |
private readonly int _stride; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.CompilerServices; | |
/// <summary> | |
/// Max size is 768 Bits. Proof: 768 / 8 = 96 * 2 = 192, 200-192=8 | |
/// </summary> | |
[Serializable] | |
public class SHA3Managed : HashAlgorithmEx | |
{ | |
private readonly KeccakSpongeManaged ksm; | |
public SHA3Managed(int size, ulong[] seed = null) : this(size, 24, seed) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.ComponentModel; | |
using System.Diagnostics; | |
using System.Globalization; | |
using System.Linq; | |
using System.Numerics; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
[Serializable] | |
[StructLayout(LayoutKind.Sequential, Pack = 1)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Diagnostics; | |
public static class CpuTotalPc | |
{ | |
private static PerformanceCounter _CPUsage; | |
public static double CPULoad | |
{ | |
get | |
{ | |
if (_CPUsage == null) | |
try |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using System.Runtime.InteropServices; | |
using System.Security; | |
public static class Rdtsc | |
{ | |
[SuppressUnmanagedCodeSecurity] | |
[UnmanagedFunctionPointer(CallingConvention.StdCall)] | |
public delegate ulong FuncUInt64(); | |
private const uint PAGE_READWRITE = 0x04; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Runtime.CompilerServices; | |
using System.Threading; | |
[Serializable] | |
public class JitterEx | |
{ | |
private const int DesaturationLoopLimit = 50; | |
private const int UpperCpuLoadLimit = 80; | |
private const int LowerCpuLoadLimit = 20; |