Task

If your system has a means to generate random numbers involving not only a software algorithm   (like the /dev/urandom devices in Unix),   then:

show how to obtain a random 32-bit number from that mechanism.

Related task
 Random_number_generator_(included)


using System;
using System.Security.Cryptography;
 
private static int GetRandomInt()
{
  int result = 0;
  var rng = new RNGCryptoServiceProvider();
  var buffer = new byte[4];
 
  rng.GetBytes(buffer);
  result = BitConverter.ToInt32(buffer, 0);
 
  return result;
}