title: SecureRandom in C#
body: <p>Here is the java code:</p>
  
  <pre class="lang-java prettyprint-override"><code>SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
  random.setSeed(someBytes);//someBytes is the seed
  </code></pre>
  
  <p>Is there any equal method in C#? What I have get is not correct:</p>
  
  <pre><code>RandomNumberGenerator rng = RNGCryptoServiceProvider.Create();
  rng.GetBytes(someBytes);// out someBytes
  </code></pre>
  
  <p>I do need the seed, because the java code did, I have to translate the java code into C#.  When I pass the same seed, the sequence I get from C# must equal with the java.</p>