[corlib] Parse datetime string using culture calendar. Fixes #18052
[mono.git] / mcs / class / corlib / System.Security.Cryptography / DeriveBytes.cs
old mode 100755 (executable)
new mode 100644 (file)
index 1733ef8..2d782fb
@@ -4,11 +4,7 @@
 // Author:\r
 //   Thomas Neidhart (tome@sbox.tugraz.at)\r
 //\r
-// (C) 2004 Novell (http://www.novell.com)
-//
-
-//
-// Copyright (C) 2004 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
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 \r
-using System;\r
+using System.Runtime.InteropServices;
 \r
 namespace System.Security.Cryptography {\r
 \r
-       public abstract class DeriveBytes {\r
-       \r
+       [ComVisible (true)]
+#if NET_4_0
+       public abstract class DeriveBytes : IDisposable {
+#else
+       public abstract class DeriveBytes {
+#endif
                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