* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / class / corlib / System.Security.Cryptography / CryptoAPITransform.cs
old mode 100755 (executable)
new mode 100644 (file)
index b31799d..716ced9
@@ -5,11 +5,7 @@
 //     Thomas Neidhart (tome@sbox.tugraz.at)
 //     Sebastien Pouliot (sebastien@ximian.com)
 //
-// (C) 2004 Novell (http://www.novell.com)
-//\r
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2005 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.
 //
 
-using System;
+using System.Runtime.InteropServices;
+using System.Security.Permissions;
 
 namespace System.Security.Cryptography {
 
        // Note: This class isn't used by Mono as all algorithms are provided with
        // 100% managed implementations.
 
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        public sealed class CryptoAPITransform : ICryptoTransform {
 
                private bool m_disposed;
@@ -47,10 +47,12 @@ namespace System.Security.Cryptography {
                        m_disposed = false;
                }
 
+#if ! NET_2_0
                ~CryptoAPITransform () 
                {
                        Dispose (false);
                }
+#endif
 
                public bool CanReuseTransform {
                        get { return true; }
@@ -65,6 +67,7 @@ namespace System.Security.Cryptography {
                }
 
                public IntPtr KeyHandle {
+                       [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
                        get { return IntPtr.Zero; }
                }
 
@@ -78,7 +81,7 @@ namespace System.Security.Cryptography {
                        GC.SuppressFinalize (this);  // Finalization is now unnecessary
                }
 
-               public void Clear() 
+               public void Clear () 
                {
                        Dispose (false);
                }
@@ -101,7 +104,15 @@ namespace System.Security.Cryptography {
 
                public byte[] TransformFinalBlock (byte[] inputBuffer, int inputOffset, int inputCount)
                {
+                       // Reset (); should be called here before returning final data
                        return null;
                }
+
+#if NET_2_0
+               [ComVisible (false)]
+               public void Reset ()
+               {
+               }
+#endif
        }
 }