2 // System.Security.Cryptography.RNGCryptoServiceProvider
4 // Author: Mark Crichton (crichton@gimp.org)
9 // "In the beginning there was Chaos,
10 // and within this Chaos was Power,
11 // Great Power without form."
12 // -- The Verrah Rubicon of Verena, Book One
15 using System.Runtime.CompilerServices;
17 namespace System.Security.Cryptography {
19 public class RNGCryptoServiceProvider : RandomNumberGenerator {
22 public RNGCryptoServiceProvider () {
23 // This will get some meaning when I figure out what the other
24 // three constructors do.
28 public RNGCryptoServiceProvider (byte[] rgb) {
29 // Ok, not called by app code... someone must call it, though.
33 public RNGCryptoServiceProvider (CspParameters cspParams) {
34 // Why do I have this feeling this is the MS CryptAPI...
38 public RNGCryptoServiceProvider (string str) {
39 // More !application code. Interesting...
42 [MethodImplAttribute(MethodImplOptions.InternalCall)]
43 public extern override void GetBytes (byte[] data);
45 [MethodImplAttribute(MethodImplOptions.InternalCall)]
46 public extern override void GetNonZeroBytes (byte[] data);
48 ~RNGCryptoServiceProvider () {