Appendix A: CryptGenRandom Seed Value Generator
(C# Language Version)
public static int getSeedValue ()
{
//The getSeedValue() class method produces four, 32-bit integers using the Microsoft CryptGenRandom
//[advapi32.dll] function. The CryptGenRandom is a cryptographically secure pseudorandom number generator function
//that produces random bytes which are multiples of 8 bits.
//The CryptoAPI uses underlying system entropy to seed its internal crypto-graphic PNG.
//The entropy pool is hashed using one of the SHA algorithms so it applies approximately 128-160 bits
//of randomness (4-5 32-bit words)
// ------------------------------------------
// Declare and initialize var1ables.
IntPtr hProv = new IntPtr();