RNGCryptoServiceProvider.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // System.Security.Cryptography.RNGCryptoServiceProvider
  3. //
  4. // Author: Mark Crichton ([email protected])
  5. //
  6. // (C) 2002
  7. //
  8. // "In the beginning there was Chaos,
  9. // and within this Chaos was Power,
  10. // Great Power without form."
  11. // -- The Verrah Rubicon of Verena, Book One
  12. using System;
  13. using System.Runtime.CompilerServices;
  14. namespace System.Security.Cryptography {
  15. public class RNGCryptoServiceProvider : RandomNumberGenerator {
  16. [MonoTODO]
  17. public RNGCryptoServiceProvider () {
  18. // This will get some meaning when I figure out what the other
  19. // three constructors do.
  20. }
  21. [MonoTODO]
  22. public RNGCryptoServiceProvider (byte[] rgb) {
  23. // Ok, not called by app code... someone must call it, though.
  24. }
  25. [MonoTODO]
  26. public RNGCryptoServiceProvider (CspParameters cspParams) {
  27. // Why do I have this feeling this is the MS CryptAPI...
  28. }
  29. [MonoTODO]
  30. public RNGCryptoServiceProvider (string str) {
  31. // More !application code. Interesting...
  32. }
  33. [MethodImplAttribute(MethodImplOptions.InternalCall)]
  34. public extern override void GetBytes (byte[] data);
  35. [MethodImplAttribute(MethodImplOptions.InternalCall)]
  36. public extern override void GetNonZeroBytes (byte[] data);
  37. ~RNGCryptoServiceProvider () {
  38. // FIN?
  39. }
  40. }
  41. }