namespace System.Security.Cryptography {
-#if NET_1_0
- public class RNGCryptoServiceProvider : RandomNumberGenerator {
-#else
- #if NET_2_0
+#if !NET_2_1
[ComVisible (true)]
- #endif
- public sealed class RNGCryptoServiceProvider : RandomNumberGenerator {
#endif
+ public sealed class RNGCryptoServiceProvider : RandomNumberGenerator {
private static object _lock;
private IntPtr _handle;
_handle = RngInitialize (null);
Check ();
}
-
+#if !NET_2_1
public RNGCryptoServiceProvider (byte[] rgb)
{
_handle = RngInitialize (rgb);
_handle = RngInitialize (Encoding.UTF8.GetBytes (str));
Check ();
}
-
+#endif
private void Check ()
{
if (_handle == IntPtr.Zero) {
_handle = IntPtr.Zero;
}
}
+
+#if NET_4_0 || MOONLIGHT
+ protected override void Dispose (bool disposing)
+ {
+ base.Dispose (disposing);
+ }
+#endif
}
}