[corlib] Parse datetime string using culture calendar. Fixes #18052
[mono.git] / mcs / class / corlib / System.Security.Cryptography / DeriveBytes.cs
index 3616eb9657f040bb5d7606de19437a72adf29c39..2d782fba475459c3a580a71a987516ad344b141d 100644 (file)
@@ -4,7 +4,7 @@
 // Author:\r
 //   Thomas Neidhart (tome@sbox.tugraz.at)\r
 //\r
-// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2005, 2011 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -30,17 +30,37 @@ using System.Runtime.InteropServices;
 \r
 namespace System.Security.Cryptography {\r
 \r
-#if NET_2_0
        [ComVisible (true)]
+#if NET_4_0
+       public abstract class DeriveBytes : IDisposable {
+#else
+       public abstract class DeriveBytes {
 #endif
-       public abstract class DeriveBytes {\r
-       \r
                protected DeriveBytes ()
                {
                }\r
                \r
                public abstract byte[] GetBytes (int cb);\r
 \r
-               public abstract void Reset ();\r
+               public abstract void Reset ();
+
+#if NET_4_0
+               private bool m_disposed;
+
+               public void Dispose ()
+               {
+                       Dispose(true);
+               }
+
+               protected virtual void Dispose (bool disposing)
+               {
+                       if (!m_disposed) {
+                               if (disposing) {
+                                       // dispose managed objects
+                               }
+                               m_disposed = true;
+                       }
+               }
+#endif
        }\r
 }\r