From ccfef2f1522f0260f9ac461045a950fb9cf24bac Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Fri, 10 Jun 2005 14:42:08 +0000 Subject: [PATCH] 2005-06-10 Sebastien Pouliot * all: 2.0 beta2 fixes, i.e. mostly added [ComVisible(true)] svn path=/trunk/mcs/; revision=45759 --- .../AsymmetricAlgorithm.cs | 11 ++-- .../AsymmetricKeyExchangeDeformatter.cs | 11 ++-- .../AsymmetricKeyExchangeFormatter.cs | 11 ++-- .../AsymmetricSignatureDeformatter.cs | 11 ++-- .../AsymmetricSignatureFormatter.cs | 11 ++-- .../Base64Constants.cs | 13 +++-- .../System.Security.Cryptography/ChangeLog | 4 ++ .../CipherMode.cs | 11 ++-- .../CryptoAPITransform.cs | 3 ++ .../CryptoConfig.cs | 4 ++ .../CryptoStream.cs | 10 ++-- .../CryptoStreamMode.cs | 10 ++-- .../CryptographicException.cs | 3 +- ...yptographicUnexpectedOperationExcpetion.cs | 6 ++- .../CspKeyContainerInfo.cs | 2 + .../CspParameters.cs | 4 ++ .../System.Security.Cryptography/DES.cs | 4 ++ .../System.Security.Cryptography/DSA.cs | 5 +- .../DSACryptoServiceProvider.cs | 3 +- .../DSAParameters.cs | 11 ++-- .../DSASignatureDeformatter.cs | 6 ++- .../DSASignatureFormatter.cs | 6 ++- .../DeriveBytes.cs | 11 ++-- .../FromBase64Transform.cs | 14 ++--- .../System.Security.Cryptography/HMACMD5.cs | 23 ++++---- .../HMACRIPEMD160.cs | 22 ++++---- .../System.Security.Cryptography/HMACSHA1.cs | 16 +++--- .../HMACSHA256.cs | 22 ++++---- .../HMACSHA384.cs | 22 ++++---- .../HMACSHA512.cs | 22 ++++---- .../HashAlgorithm.cs | 4 ++ .../ICryptoTransform.cs | 11 ++-- .../ICspAsymmetricAlgorithm.cs | 12 ++--- .../System.Security.Cryptography/KeyNumber.cs | 7 +-- .../System.Security.Cryptography/KeySizes.cs | 11 ++-- .../KeyedHashAlgorithm.cs | 11 ++-- .../MACTripleDES.cs | 7 ++- .../System.Security.Cryptography/MD5.cs | 11 ++-- .../MD5CryptoServiceProvider.cs | 5 ++ .../MaskGenerationMethod.cs | 11 ++-- .../PKCS1MaskGenerationMethod.cs | 12 ++--- .../PaddingMode.cs | 11 ++-- .../PasswordDeriveBytes.cs | 4 ++ .../System.Security.Cryptography/RC2.cs | 7 ++- .../RC2CryptoServiceProvider.cs | 5 +- .../System.Security.Cryptography/RIPEMD160.cs | 12 ++--- .../RIPEMD160Managed.cs | 3 +- .../RNGCryptoServiceProvider.cs | 5 +- .../System.Security.Cryptography/RSA.cs | 11 ++-- .../RSACryptoServiceProvider.cs | 5 +- .../RSAOAEPKeyExchangeDeformatter.cs | 4 ++ .../RSAOAEPKeyExchangeFormatter.cs | 4 ++ .../RSAPKCS1KeyExchangeDeformatter.cs | 11 ++-- .../RSAPKCS1KeyExchangeFormatter.cs | 4 ++ .../RSAPKCS1SignatureDeformatter.cs | 4 ++ .../RSAPKCS1SignatureFormatter.cs | 4 ++ .../RSAParameters.cs | 10 ++-- .../RandomNumberGenerator.cs | 11 ++-- .../Rfc2898DeriveBytes.cs | 2 + .../System.Security.Cryptography/Rijndael.cs | 11 ++-- .../RijndaelManaged.cs | 11 ++-- .../RijndaelManagedTransform.cs | 5 +- .../System.Security.Cryptography/SHA1.cs | 11 ++-- .../SHA1CryptoServiceProvider.cs | 5 ++ .../SHA1Managed.cs | 53 +++++++++---------- .../System.Security.Cryptography/SHA256.cs | 11 ++-- .../SHA256Managed.cs | 5 ++ .../System.Security.Cryptography/SHA384.cs | 11 ++-- .../SHA384Managed.cs | 11 ++-- .../System.Security.Cryptography/SHA512.cs | 11 ++-- .../SHA512Managed.cs | 11 ++-- .../SHAConstants.cs | 11 ++-- .../SignatureDescription.cs | 11 ++-- .../SymmetricAlgorithm.cs | 4 ++ .../ToBase64Transform.cs | 6 ++- .../System.Security.Cryptography/TripleDES.cs | 7 ++- .../TripleDESCryptoServiceProvider.cs | 5 +- 77 files changed, 405 insertions(+), 326 deletions(-) diff --git a/mcs/class/corlib/System.Security.Cryptography/AsymmetricAlgorithm.cs b/mcs/class/corlib/System.Security.Cryptography/AsymmetricAlgorithm.cs index c423cdc0505..9447908dd92 100644 --- a/mcs/class/corlib/System.Security.Cryptography/AsymmetricAlgorithm.cs +++ b/mcs/class/corlib/System.Security.Cryptography/AsymmetricAlgorithm.cs @@ -6,11 +6,7 @@ // Sebastien Pouliot (sebastien@ximian.com) // // Portions (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com) -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -32,11 +28,14 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; using System.Globalization; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class AsymmetricAlgorithm : IDisposable { protected int KeySizeValue; diff --git a/mcs/class/corlib/System.Security.Cryptography/AsymmetricKeyExchangeDeformatter.cs b/mcs/class/corlib/System.Security.Cryptography/AsymmetricKeyExchangeDeformatter.cs index 12b2dd66262..cf61892e926 100644 --- a/mcs/class/corlib/System.Security.Cryptography/AsymmetricKeyExchangeDeformatter.cs +++ b/mcs/class/corlib/System.Security.Cryptography/AsymmetricKeyExchangeDeformatter.cs @@ -4,11 +4,7 @@ // Authors: // Thomas Neidhart (tome@sbox.tugraz.at) // -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -30,10 +26,13 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class AsymmetricKeyExchangeDeformatter { public AsymmetricKeyExchangeDeformatter () diff --git a/mcs/class/corlib/System.Security.Cryptography/AsymmetricKeyExchangeFormatter.cs b/mcs/class/corlib/System.Security.Cryptography/AsymmetricKeyExchangeFormatter.cs index c024bb0e628..b78ed23bb23 100644 --- a/mcs/class/corlib/System.Security.Cryptography/AsymmetricKeyExchangeFormatter.cs +++ b/mcs/class/corlib/System.Security.Cryptography/AsymmetricKeyExchangeFormatter.cs @@ -4,11 +4,7 @@ // Authors: // Thomas Neidhart (tome@sbox.tugraz.at) // -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -30,10 +26,13 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class AsymmetricKeyExchangeFormatter { public AsymmetricKeyExchangeFormatter () diff --git a/mcs/class/corlib/System.Security.Cryptography/AsymmetricSignatureDeformatter.cs b/mcs/class/corlib/System.Security.Cryptography/AsymmetricSignatureDeformatter.cs index 4c3c2587c9b..61a397896b0 100644 --- a/mcs/class/corlib/System.Security.Cryptography/AsymmetricSignatureDeformatter.cs +++ b/mcs/class/corlib/System.Security.Cryptography/AsymmetricSignatureDeformatter.cs @@ -4,11 +4,7 @@ // Authors: // Thomas Neidhart (tome@sbox.tugraz.at) // -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -30,10 +26,13 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class AsymmetricSignatureDeformatter { public AsymmetricSignatureDeformatter () diff --git a/mcs/class/corlib/System.Security.Cryptography/AsymmetricSignatureFormatter.cs b/mcs/class/corlib/System.Security.Cryptography/AsymmetricSignatureFormatter.cs index 90c8737fbdb..f17b4a7ce34 100644 --- a/mcs/class/corlib/System.Security.Cryptography/AsymmetricSignatureFormatter.cs +++ b/mcs/class/corlib/System.Security.Cryptography/AsymmetricSignatureFormatter.cs @@ -4,11 +4,7 @@ // Authors: // Thomas Neidhart (tome@sbox.tugraz.at) // -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -30,10 +26,13 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class AsymmetricSignatureFormatter { public AsymmetricSignatureFormatter () diff --git a/mcs/class/corlib/System.Security.Cryptography/Base64Constants.cs b/mcs/class/corlib/System.Security.Cryptography/Base64Constants.cs index 433fc9b7b56..9a0c6ffc5b2 100644 --- a/mcs/class/corlib/System.Security.Cryptography/Base64Constants.cs +++ b/mcs/class/corlib/System.Security.Cryptography/Base64Constants.cs @@ -5,11 +5,7 @@ // Sergey Chaban (serge@wildwestsoftware.com) // Sebastien Pouliot // -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -32,14 +28,17 @@ // namespace System.Security.Cryptography { - + +#if NET_2_0 + internal static class Base64Constants { +#else internal sealed class Base64Constants { private Base64Constants () { // Never instantiated. } - +#endif // Pre-calculated tables public static readonly byte[] EncodeTable = { diff --git a/mcs/class/corlib/System.Security.Cryptography/ChangeLog b/mcs/class/corlib/System.Security.Cryptography/ChangeLog index e84f5e99a04..360a4b7d237 100644 --- a/mcs/class/corlib/System.Security.Cryptography/ChangeLog +++ b/mcs/class/corlib/System.Security.Cryptography/ChangeLog @@ -1,3 +1,7 @@ +2005-06-10 Sebastien Pouliot + + * all: 2.0 beta2 fixes, i.e. mostly added [ComVisible(true)] + 2005-06-09 Sebastien Pouliot * HMAC.cs: BlockSizeValue has changed from a protected member to diff --git a/mcs/class/corlib/System.Security.Cryptography/CipherMode.cs b/mcs/class/corlib/System.Security.Cryptography/CipherMode.cs index 0b692c0a58d..461868782a3 100644 --- a/mcs/class/corlib/System.Security.Cryptography/CipherMode.cs +++ b/mcs/class/corlib/System.Security.Cryptography/CipherMode.cs @@ -5,11 +5,7 @@ // Matthew S. Ford (Matthew.S.Ford@Rose-Hulman.Edu) // // Copyright 2001 by Matthew S. Ford. -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -31,9 +27,14 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +using System.Runtime.InteropServices; + namespace System.Security.Cryptography { [Serializable] +#if NET_2_0 + [ComVisible (true)] +#endif public enum CipherMode { CBC = 0x1, // Cipher Block Chaining ECB, // Electronic Codebook diff --git a/mcs/class/corlib/System.Security.Cryptography/CryptoAPITransform.cs b/mcs/class/corlib/System.Security.Cryptography/CryptoAPITransform.cs index 52bd23935c2..716ced9728c 100644 --- a/mcs/class/corlib/System.Security.Cryptography/CryptoAPITransform.cs +++ b/mcs/class/corlib/System.Security.Cryptography/CryptoAPITransform.cs @@ -35,6 +35,9 @@ 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; diff --git a/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.cs b/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.cs index 846466c64ed..e51ce0f45f0 100644 --- a/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.cs +++ b/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.cs @@ -34,6 +34,7 @@ using System.Globalization; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using System.Security.Permissions; using System.Text; @@ -41,6 +42,9 @@ using Mono.Xml; namespace System.Security.Cryptography { +#if NET_2_0 +[ComVisible (true)] +#endif public class CryptoConfig { static private object lockObject; diff --git a/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs b/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs index 986279dc5f3..4c0ab0561a8 100644 --- a/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs +++ b/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs @@ -6,11 +6,7 @@ // Sebastien Pouliot (sebastien@ximian.com) // // Portions (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com) -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -32,13 +28,15 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; using System.Globalization; using System.IO; using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public class CryptoStream : Stream { private Stream _stream; private ICryptoTransform _transform; diff --git a/mcs/class/corlib/System.Security.Cryptography/CryptoStreamMode.cs b/mcs/class/corlib/System.Security.Cryptography/CryptoStreamMode.cs index ced82a67a19..9a2f50e476a 100644 --- a/mcs/class/corlib/System.Security.Cryptography/CryptoStreamMode.cs +++ b/mcs/class/corlib/System.Security.Cryptography/CryptoStreamMode.cs @@ -5,10 +5,7 @@ // Matthew S. Ford (Matthew.S.Ford@Rose-Hulman.Edu) // // Copyright 2001 by authors. -// - -// -// 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 @@ -30,9 +27,14 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +using System.Runtime.InteropServices; + namespace System.Security.Cryptography { [Serializable] +#if NET_2_0 + [ComVisible (true)] +#endif public enum CryptoStreamMode { Read, Write diff --git a/mcs/class/corlib/System.Security.Cryptography/CryptographicException.cs b/mcs/class/corlib/System.Security.Cryptography/CryptographicException.cs index 164e50dd83b..1977e88a465 100644 --- a/mcs/class/corlib/System.Security.Cryptography/CryptographicException.cs +++ b/mcs/class/corlib/System.Security.Cryptography/CryptographicException.cs @@ -5,7 +5,7 @@ // Thomas Neidhart (tome@sbox.tugraz.at) // Sebastien Pouliot // -// 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 @@ -38,6 +38,7 @@ namespace System.Security.Cryptography { [Serializable] #if NET_2_0 + [ComVisible (true)] public class CryptographicException : SystemException, _Exception { #else public class CryptographicException : SystemException { diff --git a/mcs/class/corlib/System.Security.Cryptography/CryptographicUnexpectedOperationExcpetion.cs b/mcs/class/corlib/System.Security.Cryptography/CryptographicUnexpectedOperationExcpetion.cs index 06f360d924d..28f445ce4b1 100644 --- a/mcs/class/corlib/System.Security.Cryptography/CryptographicUnexpectedOperationExcpetion.cs +++ b/mcs/class/corlib/System.Security.Cryptography/CryptographicUnexpectedOperationExcpetion.cs @@ -5,7 +5,7 @@ // Thomas Neidhart (tome@sbox.tugraz.at) // Sebastien Pouliot // -// 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 @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; using System.Globalization; using System.Runtime.InteropServices; using System.Runtime.Serialization; @@ -35,6 +34,9 @@ using System.Runtime.Serialization; namespace System.Security.Cryptography { [Serializable] +#if NET_2_0 + [ComVisible (true)] +#endif public class CryptographicUnexpectedOperationException : CryptographicException { public CryptographicUnexpectedOperationException () diff --git a/mcs/class/corlib/System.Security.Cryptography/CspKeyContainerInfo.cs b/mcs/class/corlib/System.Security.Cryptography/CspKeyContainerInfo.cs index 5b66db2a80d..a079d7d114f 100644 --- a/mcs/class/corlib/System.Security.Cryptography/CspKeyContainerInfo.cs +++ b/mcs/class/corlib/System.Security.Cryptography/CspKeyContainerInfo.cs @@ -29,10 +29,12 @@ #if NET_2_0 +using System.Runtime.InteropServices; using System.Security.AccessControl; namespace System.Security.Cryptography { + [ComVisible (true)] public sealed class CspKeyContainerInfo { private CspParameters _params; diff --git a/mcs/class/corlib/System.Security.Cryptography/CspParameters.cs b/mcs/class/corlib/System.Security.Cryptography/CspParameters.cs index 8cb3e1c519b..1645d5a2641 100644 --- a/mcs/class/corlib/System.Security.Cryptography/CspParameters.cs +++ b/mcs/class/corlib/System.Security.Cryptography/CspParameters.cs @@ -28,11 +28,15 @@ // #if NET_2_0 +using System.Runtime.InteropServices; using System.Security.AccessControl; #endif namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public sealed class CspParameters { private CspProviderFlags _Flags; diff --git a/mcs/class/corlib/System.Security.Cryptography/DES.cs b/mcs/class/corlib/System.Security.Cryptography/DES.cs index 8a14a874ed1..68b7e055c68 100644 --- a/mcs/class/corlib/System.Security.Cryptography/DES.cs +++ b/mcs/class/corlib/System.Security.Cryptography/DES.cs @@ -29,6 +29,7 @@ // using System.Globalization; +using System.Runtime.InteropServices; // References: // a. FIPS PUB 46-3: Data Encryption Standard @@ -36,6 +37,9 @@ using System.Globalization; namespace System.Security.Cryptography { +#if NET_2_0 +[ComVisible (true)] +#endif public abstract class DES : SymmetricAlgorithm { private const int keySizeByte = 8; diff --git a/mcs/class/corlib/System.Security.Cryptography/DSA.cs b/mcs/class/corlib/System.Security.Cryptography/DSA.cs index 0f10dc8b909..37f24f93160 100644 --- a/mcs/class/corlib/System.Security.Cryptography/DSA.cs +++ b/mcs/class/corlib/System.Security.Cryptography/DSA.cs @@ -28,8 +28,8 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; using System.Globalization; +using System.Runtime.InteropServices; using System.Text; using Mono.Xml; @@ -41,6 +41,9 @@ using Mono.Security; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class DSA : AsymmetricAlgorithm { #if NET_2_0 diff --git a/mcs/class/corlib/System.Security.Cryptography/DSACryptoServiceProvider.cs b/mcs/class/corlib/System.Security.Cryptography/DSACryptoServiceProvider.cs index f9e784468bb..7e000fbdfce 100644 --- a/mcs/class/corlib/System.Security.Cryptography/DSACryptoServiceProvider.cs +++ b/mcs/class/corlib/System.Security.Cryptography/DSACryptoServiceProvider.cs @@ -9,7 +9,7 @@ // (C) 2002 // Portions (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com) // Portions (C) 2003 Ben Maurer -// 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 @@ -40,6 +40,7 @@ using Mono.Security.Cryptography; namespace System.Security.Cryptography { #if NET_2_0 + [ComVisible (true)] public sealed class DSACryptoServiceProvider : DSA, ICspAsymmetricAlgorithm { #elif NET_1_1 public sealed class DSACryptoServiceProvider : DSA { diff --git a/mcs/class/corlib/System.Security.Cryptography/DSAParameters.cs b/mcs/class/corlib/System.Security.Cryptography/DSAParameters.cs index 3428caa222b..9669c14c36d 100644 --- a/mcs/class/corlib/System.Security.Cryptography/DSAParameters.cs +++ b/mcs/class/corlib/System.Security.Cryptography/DSAParameters.cs @@ -4,11 +4,7 @@ // Author: // Thomas Neidhart (tome@sbox.tugraz.at) // -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -30,11 +26,14 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { [Serializable] +#if NET_2_0 + [ComVisible (true)] +#endif public struct DSAParameters { public int Counter; diff --git a/mcs/class/corlib/System.Security.Cryptography/DSASignatureDeformatter.cs b/mcs/class/corlib/System.Security.Cryptography/DSASignatureDeformatter.cs index bbc69b4b855..a0b74e1fe0f 100644 --- a/mcs/class/corlib/System.Security.Cryptography/DSASignatureDeformatter.cs +++ b/mcs/class/corlib/System.Security.Cryptography/DSASignatureDeformatter.cs @@ -6,7 +6,7 @@ // Sebastien Pouliot (sebastien@ximian.com) // // Portions (C) 2002 Motus Technologies Inc. (http://www.motus.com) -// 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 @@ -29,9 +29,13 @@ // using System.Globalization; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public class DSASignatureDeformatter : AsymmetricSignatureDeformatter { private DSA dsa; diff --git a/mcs/class/corlib/System.Security.Cryptography/DSASignatureFormatter.cs b/mcs/class/corlib/System.Security.Cryptography/DSASignatureFormatter.cs index 893d93c321d..584e575fa04 100644 --- a/mcs/class/corlib/System.Security.Cryptography/DSASignatureFormatter.cs +++ b/mcs/class/corlib/System.Security.Cryptography/DSASignatureFormatter.cs @@ -6,7 +6,7 @@ // Sebastien Pouliot (sebastien@ximian.com) // // Portions (C) 2002 Motus Technologies Inc. (http://www.motus.com) -// 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 @@ -29,9 +29,13 @@ // using System.Globalization; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public class DSASignatureFormatter : AsymmetricSignatureFormatter { private DSA dsa; diff --git a/mcs/class/corlib/System.Security.Cryptography/DeriveBytes.cs b/mcs/class/corlib/System.Security.Cryptography/DeriveBytes.cs index 1733ef82668..3616eb9657f 100644 --- a/mcs/class/corlib/System.Security.Cryptography/DeriveBytes.cs +++ b/mcs/class/corlib/System.Security.Cryptography/DeriveBytes.cs @@ -4,11 +4,7 @@ // Author: // Thomas Neidhart (tome@sbox.tugraz.at) // -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -30,10 +26,13 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class DeriveBytes { protected DeriveBytes () diff --git a/mcs/class/corlib/System.Security.Cryptography/FromBase64Transform.cs b/mcs/class/corlib/System.Security.Cryptography/FromBase64Transform.cs index 9991fba2f46..59b71d2587e 100644 --- a/mcs/class/corlib/System.Security.Cryptography/FromBase64Transform.cs +++ b/mcs/class/corlib/System.Security.Cryptography/FromBase64Transform.cs @@ -4,11 +4,7 @@ // Author: // Sergey Chaban (serge@wildwestsoftware.com) // -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -30,17 +26,23 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; using System.Globalization; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { [Serializable] +#if NET_2_0 + [ComVisible (true)] +#endif public enum FromBase64TransformMode : int { IgnoreWhiteSpaces, DoNotIgnoreWhiteSpaces } +#if NET_2_0 + [ComVisible (true)] +#endif public class FromBase64Transform : ICryptoTransform { private FromBase64TransformMode mode; diff --git a/mcs/class/corlib/System.Security.Cryptography/HMACMD5.cs b/mcs/class/corlib/System.Security.Cryptography/HMACMD5.cs index 39eb9ad0b3e..bc940171f17 100644 --- a/mcs/class/corlib/System.Security.Cryptography/HMACMD5.cs +++ b/mcs/class/corlib/System.Security.Cryptography/HMACMD5.cs @@ -2,13 +2,10 @@ // HMACMD5.cs: HMAC implementation using MD5 // // Author: -// Sebastien Pouliot (spouliot@motus.com) +// Sebastien Pouliot // // (C) 2003 Motus Technologies Inc. (http://www.motus.com) -// - -// -// 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 @@ -32,7 +29,7 @@ #if NET_2_0 -using System; +using System.Runtime.InteropServices; using Mono.Security.Cryptography; @@ -45,10 +42,13 @@ namespace System.Security.Cryptography { // b. IETF RFC2202: Test Cases for HMAC-MD5 and HMAC-SHA-1 // (include C source for HMAC-MD5 and HAMAC-SHA1) // http://www.ietf.org/rfc/rfc2202.txt - + [ComVisible (true)] public class HMACMD5 : HMAC { - public HMACMD5 () : this (KeyBuilder.Key (8)) {} + public HMACMD5 () + : this (KeyBuilder.Key (8)) + { + } public HMACMD5 (byte[] rgbKey) : base () { @@ -56,12 +56,7 @@ namespace System.Security.Cryptography { HashSizeValue = 128; Key = rgbKey; } - - ~HMACMD5 () - { - Dispose (false); - } } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/corlib/System.Security.Cryptography/HMACRIPEMD160.cs b/mcs/class/corlib/System.Security.Cryptography/HMACRIPEMD160.cs index 379917e0315..88295ca934c 100644 --- a/mcs/class/corlib/System.Security.Cryptography/HMACRIPEMD160.cs +++ b/mcs/class/corlib/System.Security.Cryptography/HMACRIPEMD160.cs @@ -2,13 +2,10 @@ // HMACRIPEMD160.cs: HMAC implementation using RIPEMD160 // // Author: -// Sebastien Pouliot (spouliot@motus.com) +// Sebastien Pouliot // // (C) 2003 Motus Technologies Inc. (http://www.motus.com) -// - -// -// 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 @@ -32,15 +29,19 @@ #if NET_2_0 -using System; +using System.Runtime.InteropServices; using Mono.Security.Cryptography; namespace System.Security.Cryptography { + [ComVisible (true)] public class HMACRIPEMD160 : HMAC { - public HMACRIPEMD160 () : this (KeyBuilder.Key (8)) {} + public HMACRIPEMD160 () + : this (KeyBuilder.Key (8)) + { + } public HMACRIPEMD160 (byte[] rgbKey) : base () { @@ -48,12 +49,7 @@ namespace System.Security.Cryptography { HashSizeValue = 160; Key = rgbKey; } - - ~HMACRIPEMD160 () - { - Dispose (false); - } } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/corlib/System.Security.Cryptography/HMACSHA1.cs b/mcs/class/corlib/System.Security.Cryptography/HMACSHA1.cs index dcecc27d9fa..59cf46211bd 100644 --- a/mcs/class/corlib/System.Security.Cryptography/HMACSHA1.cs +++ b/mcs/class/corlib/System.Security.Cryptography/HMACSHA1.cs @@ -2,10 +2,10 @@ // HMACSHA1.cs: Handles HMAC with SHA-1 // // Author: -// Sebastien Pouliot +// Sebastien Pouliot // -// (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com) -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) +// (C) 2003 Motus Technologies Inc. (http://www.motus.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 @@ -28,6 +28,7 @@ // using System.IO; +using System.Runtime.InteropServices; using Mono.Security.Cryptography; @@ -133,9 +134,11 @@ namespace System.Security.Cryptography { } } #else + [ComVisible (true)] public class HMACSHA1 : HMAC { - public HMACSHA1 () : this (KeyBuilder.Key (8)) + public HMACSHA1 () + : this (KeyBuilder.Key (8)) { } @@ -145,11 +148,6 @@ namespace System.Security.Cryptography { HashSizeValue = 160; Key = rgbKey; } - - ~HMACSHA1 () - { - Dispose (false); - } } #endif } diff --git a/mcs/class/corlib/System.Security.Cryptography/HMACSHA256.cs b/mcs/class/corlib/System.Security.Cryptography/HMACSHA256.cs index 9763a708a34..00f0f540a71 100644 --- a/mcs/class/corlib/System.Security.Cryptography/HMACSHA256.cs +++ b/mcs/class/corlib/System.Security.Cryptography/HMACSHA256.cs @@ -2,13 +2,10 @@ // HMACSHA256.cs: HMAC implementation using SHA256 // // Author: -// Sebastien Pouliot (spouliot@motus.com) +// Sebastien Pouliot // // (C) 2003 Motus Technologies Inc. (http://www.motus.com) -// - -// -// 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 @@ -32,15 +29,19 @@ #if NET_2_0 -using System; +using System.Runtime.InteropServices; using Mono.Security.Cryptography; namespace System.Security.Cryptography { + [ComVisible (true)] public class HMACSHA256 : HMAC { - public HMACSHA256 () : this (KeyBuilder.Key (8)) {} + public HMACSHA256 () + : this (KeyBuilder.Key (8)) + { + } public HMACSHA256 (byte[] rgbKey) : base () { @@ -48,12 +49,7 @@ namespace System.Security.Cryptography { HashSizeValue = 256; Key = rgbKey; } - - ~HMACSHA256 () - { - Dispose (false); - } } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/corlib/System.Security.Cryptography/HMACSHA384.cs b/mcs/class/corlib/System.Security.Cryptography/HMACSHA384.cs index df391867b99..eeeac22e78d 100644 --- a/mcs/class/corlib/System.Security.Cryptography/HMACSHA384.cs +++ b/mcs/class/corlib/System.Security.Cryptography/HMACSHA384.cs @@ -2,13 +2,10 @@ // HMACSHA384.cs: HMAC implementation using SHA384 // // Author: -// Sebastien Pouliot (spouliot@motus.com) +// Sebastien Pouliot // // (C) 2003 Motus Technologies Inc. (http://www.motus.com) -// - -// -// 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 @@ -32,15 +29,19 @@ #if NET_2_0 -using System; +using System.Runtime.InteropServices; using Mono.Security.Cryptography; namespace System.Security.Cryptography { + [ComVisible (true)] public class HMACSHA384 : HMAC { - public HMACSHA384 () : this (KeyBuilder.Key (8)) {} + public HMACSHA384 () + : this (KeyBuilder.Key (8)) + { + } public HMACSHA384 (byte[] rgbKey) : base () { @@ -48,12 +49,7 @@ namespace System.Security.Cryptography { HashSizeValue = 384; Key = rgbKey; } - - ~HMACSHA384 () - { - Dispose (false); - } } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/corlib/System.Security.Cryptography/HMACSHA512.cs b/mcs/class/corlib/System.Security.Cryptography/HMACSHA512.cs index 918cc0525d1..7c89a800d9c 100644 --- a/mcs/class/corlib/System.Security.Cryptography/HMACSHA512.cs +++ b/mcs/class/corlib/System.Security.Cryptography/HMACSHA512.cs @@ -2,13 +2,10 @@ // HMACSHA512.cs: HMAC implementation using SHA512 // // Author: -// Sebastien Pouliot (spouliot@motus.com) +// Sebastien Pouliot // // (C) 2003 Motus Technologies Inc. (http://www.motus.com) -// - -// -// 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 @@ -32,15 +29,19 @@ #if NET_2_0 -using System; +using System.Runtime.InteropServices; using Mono.Security.Cryptography; namespace System.Security.Cryptography { + [ComVisible (true)] public class HMACSHA512 : HMAC { - public HMACSHA512 () : this (KeyBuilder.Key (8)) {} + public HMACSHA512 () + : this (KeyBuilder.Key (8)) + { + } public HMACSHA512 (byte[] rgbKey) : base () { @@ -48,12 +49,7 @@ namespace System.Security.Cryptography { HashSizeValue = 512; Key = rgbKey; } - - ~HMACSHA512 () - { - Dispose (false); - } } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/corlib/System.Security.Cryptography/HashAlgorithm.cs b/mcs/class/corlib/System.Security.Cryptography/HashAlgorithm.cs index 2ab98e393ef..14e5d116c57 100644 --- a/mcs/class/corlib/System.Security.Cryptography/HashAlgorithm.cs +++ b/mcs/class/corlib/System.Security.Cryptography/HashAlgorithm.cs @@ -31,9 +31,13 @@ using System.Globalization; using System.IO; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class HashAlgorithm : ICryptoTransform { protected byte[] HashValue; diff --git a/mcs/class/corlib/System.Security.Cryptography/ICryptoTransform.cs b/mcs/class/corlib/System.Security.Cryptography/ICryptoTransform.cs index 2fa08377053..dda99d8b81b 100644 --- a/mcs/class/corlib/System.Security.Cryptography/ICryptoTransform.cs +++ b/mcs/class/corlib/System.Security.Cryptography/ICryptoTransform.cs @@ -5,11 +5,7 @@ // Matthew S. Ford (Matthew.S.Ford@Rose-Hulman.Edu) // // Copyright 2001 by Matthew S. Ford. -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -31,10 +27,13 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public interface ICryptoTransform : IDisposable { bool CanReuseTransform { diff --git a/mcs/class/corlib/System.Security.Cryptography/ICspAsymmetricAlgorithm.cs b/mcs/class/corlib/System.Security.Cryptography/ICspAsymmetricAlgorithm.cs index 89281c6299b..89952b584e5 100644 --- a/mcs/class/corlib/System.Security.Cryptography/ICspAsymmetricAlgorithm.cs +++ b/mcs/class/corlib/System.Security.Cryptography/ICspAsymmetricAlgorithm.cs @@ -2,13 +2,10 @@ // ICspAsymmetricAlgorithm.cs: interface for CSP based asymmetric algorithm // // Author: -// Sebastien Pouliot (spouliot@motus.com) +// Sebastien Pouliot (sebastien@ximian.com) // // (C) 2003 Motus Technologies Inc. (http://www.motus.com) -// - -// -// 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 @@ -32,10 +29,11 @@ #if NET_2_0 -using System; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { + [ComVisible (true)] public interface ICspAsymmetricAlgorithm { byte[] ExportCspBlob (bool includePrivateParameters); @@ -46,4 +44,4 @@ namespace System.Security.Cryptography { } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/corlib/System.Security.Cryptography/KeyNumber.cs b/mcs/class/corlib/System.Security.Cryptography/KeyNumber.cs index 6ad4e4af59e..2c95ef9dfd5 100644 --- a/mcs/class/corlib/System.Security.Cryptography/KeyNumber.cs +++ b/mcs/class/corlib/System.Security.Cryptography/KeyNumber.cs @@ -2,10 +2,10 @@ // KeyNumber.cs: Key Number for CAPI containers // // Author: -// Sebastien Pouliot (spouliot@motus.com) +// Sebastien Pouliot (sebastien@ximian.com) // // (C) 2003 Motus Technologies Inc. (http://www.motus.com) -// 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 @@ -29,10 +29,11 @@ #if NET_2_0 -using System; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { + [ComVisible (true)] public enum KeyNumber { Exchange = 1, Signature = 2 diff --git a/mcs/class/corlib/System.Security.Cryptography/KeySizes.cs b/mcs/class/corlib/System.Security.Cryptography/KeySizes.cs index 6594d2a7661..a673bd774ef 100644 --- a/mcs/class/corlib/System.Security.Cryptography/KeySizes.cs +++ b/mcs/class/corlib/System.Security.Cryptography/KeySizes.cs @@ -7,11 +7,7 @@ // Sebastien Pouliot (sebastien@ximian.com) // // Copyright 2001 by Matthew S. Ford. -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -33,11 +29,16 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +using System.Runtime.InteropServices; + namespace System.Security.Cryptography { #if NET_1_0 public class KeySizes { #else + #if NET_2_0 + [ComVisible (true)] + #endif public sealed class KeySizes { #endif private int _maxSize; diff --git a/mcs/class/corlib/System.Security.Cryptography/KeyedHashAlgorithm.cs b/mcs/class/corlib/System.Security.Cryptography/KeyedHashAlgorithm.cs index 72f086dd149..7b9bd53432e 100644 --- a/mcs/class/corlib/System.Security.Cryptography/KeyedHashAlgorithm.cs +++ b/mcs/class/corlib/System.Security.Cryptography/KeyedHashAlgorithm.cs @@ -5,11 +5,7 @@ // Sebastien Pouliot (sebastien@ximian.com) // // (C) 2002 Motus Technologies Inc. (http://www.motus.com) -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -31,11 +27,14 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; using System.Globalization; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 +[ComVisible (true)] +#endif public abstract class KeyedHashAlgorithm : HashAlgorithm { protected byte[] KeyValue; diff --git a/mcs/class/corlib/System.Security.Cryptography/MACTripleDES.cs b/mcs/class/corlib/System.Security.Cryptography/MACTripleDES.cs index f24dad75552..73eb0e58fba 100644 --- a/mcs/class/corlib/System.Security.Cryptography/MACTripleDES.cs +++ b/mcs/class/corlib/System.Security.Cryptography/MACTripleDES.cs @@ -2,10 +2,10 @@ // MACTripleDES.cs: Handles MAC with TripleDES // // Author: -// Sebastien Pouliot (spouliot@motus.com) +// Sebastien Pouliot (sebastien@ximian.com) // // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com) -// 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 @@ -39,6 +39,9 @@ namespace System.Security.Cryptography { // http://www.itl.nist.gov/fipspubs/fip81.htm // LAMESPEC: MACTripleDES == MAC-CBC using TripleDES (not MAC-CFB). +#if NET_2_0 + [ComVisible (true)] +#endif public class MACTripleDES: KeyedHashAlgorithm { private TripleDES tdes; diff --git a/mcs/class/corlib/System.Security.Cryptography/MD5.cs b/mcs/class/corlib/System.Security.Cryptography/MD5.cs index bf56211c840..6fa2d7bebde 100644 --- a/mcs/class/corlib/System.Security.Cryptography/MD5.cs +++ b/mcs/class/corlib/System.Security.Cryptography/MD5.cs @@ -7,11 +7,7 @@ // // Copyright 2001 by Matthew S. Ford. // Portions (C) 2002 Motus Technologies Inc. (http://www.motus.com) -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -32,9 +28,14 @@ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // + +using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class MD5 : HashAlgorithm { // Why is it protected when others abstract hash classes are public ? diff --git a/mcs/class/corlib/System.Security.Cryptography/MD5CryptoServiceProvider.cs b/mcs/class/corlib/System.Security.Cryptography/MD5CryptoServiceProvider.cs index 3a036375149..a2403407d2d 100644 --- a/mcs/class/corlib/System.Security.Cryptography/MD5CryptoServiceProvider.cs +++ b/mcs/class/corlib/System.Security.Cryptography/MD5CryptoServiceProvider.cs @@ -28,11 +28,16 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +using System.Runtime.InteropServices; + namespace System.Security.Cryptography { #if NET_1_0 public class MD5CryptoServiceProvider : MD5 { #else + #if NET_2_0 + [ComVisible (true)] + #endif public sealed class MD5CryptoServiceProvider : MD5 { #endif private const int BLOCK_SIZE_BYTES = 64; diff --git a/mcs/class/corlib/System.Security.Cryptography/MaskGenerationMethod.cs b/mcs/class/corlib/System.Security.Cryptography/MaskGenerationMethod.cs index 44e21e33c58..5fb42372fd2 100644 --- a/mcs/class/corlib/System.Security.Cryptography/MaskGenerationMethod.cs +++ b/mcs/class/corlib/System.Security.Cryptography/MaskGenerationMethod.cs @@ -5,11 +5,7 @@ // Sebastien Pouliot (sebastien@ximian.com) // // (C) 2002 Motus Technologies Inc. (http://www.motus.com) -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -31,8 +27,13 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +using System.Runtime.InteropServices; + namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class MaskGenerationMethod { protected MaskGenerationMethod () diff --git a/mcs/class/corlib/System.Security.Cryptography/PKCS1MaskGenerationMethod.cs b/mcs/class/corlib/System.Security.Cryptography/PKCS1MaskGenerationMethod.cs index f15b15eaf9a..92a34842e4a 100644 --- a/mcs/class/corlib/System.Security.Cryptography/PKCS1MaskGenerationMethod.cs +++ b/mcs/class/corlib/System.Security.Cryptography/PKCS1MaskGenerationMethod.cs @@ -2,13 +2,10 @@ // PKCS1MaskGenerationMethod.cs: Handles PKCS#1 mask generation. // // Author: -// Sebastien Pouliot (spouliot@motus.com) +// Sebastien Pouliot (sebastien@ximian.com) // // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com) -// - -// -// 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 @@ -30,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; +using System.Runtime.InteropServices; using Mono.Security.Cryptography; namespace System.Security.Cryptography { @@ -39,6 +36,9 @@ namespace System.Security.Cryptography { // a. PKCS#1: RSA Cryptography Standard // http://www.rsasecurity.com/rsalabs/pkcs/pkcs-1/index.html +#if NET_2_0 + [ComVisible (true)] +#endif public class PKCS1MaskGenerationMethod : MaskGenerationMethod { private string hashName; diff --git a/mcs/class/corlib/System.Security.Cryptography/PaddingMode.cs b/mcs/class/corlib/System.Security.Cryptography/PaddingMode.cs index 2bb1070768b..fd9af0f96d0 100644 --- a/mcs/class/corlib/System.Security.Cryptography/PaddingMode.cs +++ b/mcs/class/corlib/System.Security.Cryptography/PaddingMode.cs @@ -7,11 +7,7 @@ // // Copyright 2001 by Matthew S. Ford. // Portions (C) 2003 Motus Technologies Inc. (http://www.motus.com) -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -33,8 +29,13 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +using System.Runtime.InteropServices; + namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif [Serializable] public enum PaddingMode { None = 0x1, diff --git a/mcs/class/corlib/System.Security.Cryptography/PasswordDeriveBytes.cs b/mcs/class/corlib/System.Security.Cryptography/PasswordDeriveBytes.cs index 0dd5e368808..a722a7857c3 100644 --- a/mcs/class/corlib/System.Security.Cryptography/PasswordDeriveBytes.cs +++ b/mcs/class/corlib/System.Security.Cryptography/PasswordDeriveBytes.cs @@ -28,6 +28,7 @@ // using System.Globalization; +using System.Runtime.InteropServices; using System.Text; namespace System.Security.Cryptography { @@ -38,6 +39,9 @@ namespace System.Security.Cryptography { // b. IETF RFC2898: PKCS #5: Password-Based Cryptography Specification Version 2.0 // http://www.rfc-editor.org/rfc/rfc2898.txt +#if NET_2_0 +[ComVisible (true)] +#endif public class PasswordDeriveBytes : DeriveBytes { private string HashNameValue; diff --git a/mcs/class/corlib/System.Security.Cryptography/RC2.cs b/mcs/class/corlib/System.Security.Cryptography/RC2.cs index 70119078722..17d6a180207 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RC2.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RC2.cs @@ -5,7 +5,7 @@ // Andrew Birkett (andy@nobugs.org) // Sebastien Pouliot (sebastien@ximian.com) // -// 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 @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { @@ -35,6 +35,9 @@ namespace System.Security.Cryptography { // a. IETF RFC2286: A Description of the RC2(r) Encryption Algorithm // http://www.ietf.org/rfc/rfc2268.txt +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class RC2 : SymmetricAlgorithm { public static new RC2 Create () diff --git a/mcs/class/corlib/System.Security.Cryptography/RC2CryptoServiceProvider.cs b/mcs/class/corlib/System.Security.Cryptography/RC2CryptoServiceProvider.cs index 83aa05cce2c..e40e02c3233 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RC2CryptoServiceProvider.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RC2CryptoServiceProvider.cs @@ -6,7 +6,7 @@ // Sebastien Pouliot (sebastien@ximian.com) // // Portions (C) 2002 Motus Technologies Inc. (http://www.motus.com) -// 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 @@ -39,6 +39,9 @@ namespace System.Security.Cryptography { // a. IETF RFC2286: A Description of the RC2(r) Encryption Algorithm // http://www.ietf.org/rfc/rfc2268.txt +#if NET_2_0 + [ComVisible (true)] +#endif public sealed class RC2CryptoServiceProvider : RC2 { private bool _useSalt; diff --git a/mcs/class/corlib/System.Security.Cryptography/RIPEMD160.cs b/mcs/class/corlib/System.Security.Cryptography/RIPEMD160.cs index 1d2ddc4c788..9b936c95d78 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RIPEMD160.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RIPEMD160.cs @@ -5,10 +5,7 @@ // Pieter Philippaerts (Pieter@mentalis.org) // // (C) 2003 The Mentalis.org Team (http://www.mentalis.org/) -// - -// -// 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 @@ -32,12 +29,15 @@ #if NET_2_0 -using System; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { /// /// Represents the abstract class from which all implementations of the hash algorithm inherit. /// +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class RIPEMD160 : HashAlgorithm { /// /// Initializes a new instance of . @@ -68,4 +68,4 @@ namespace System.Security.Cryptography { } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/corlib/System.Security.Cryptography/RIPEMD160Managed.cs b/mcs/class/corlib/System.Security.Cryptography/RIPEMD160Managed.cs index bdb22deb34e..9f1cf467b61 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RIPEMD160Managed.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RIPEMD160Managed.cs @@ -8,7 +8,7 @@ // - http://www.esat.kuleuven.ac.be/~cosicart/ps/AB-9601/ // // (C) 2003 The Mentalis.org Team (http://www.mentalis.org/) -// 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 @@ -38,6 +38,7 @@ namespace System.Security.Cryptography { /// /// Computes the hash for the input data. /// + [ComVisible (true)] public class RIPEMD160Managed : RIPEMD160 { // not 'sealed' according to preliminary docs; this may change though /// /// Initializes a new instance of the class. This class cannot be inherited. diff --git a/mcs/class/corlib/System.Security.Cryptography/RNGCryptoServiceProvider.cs b/mcs/class/corlib/System.Security.Cryptography/RNGCryptoServiceProvider.cs index cded574758d..71fcdc062f1 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RNGCryptoServiceProvider.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RNGCryptoServiceProvider.cs @@ -33,9 +33,9 @@ // Great Power without form." // -- The Verrah Rubicon of Verena, Book One -using System; using System.Globalization; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using System.Text; namespace System.Security.Cryptography { @@ -43,6 +43,9 @@ namespace System.Security.Cryptography { #if NET_1_0 public class RNGCryptoServiceProvider : RandomNumberGenerator { #else + #if NET_2_0 + [ComVisible (true)] + #endif public sealed class RNGCryptoServiceProvider : RandomNumberGenerator { #endif private static object _lock; diff --git a/mcs/class/corlib/System.Security.Cryptography/RSA.cs b/mcs/class/corlib/System.Security.Cryptography/RSA.cs index f6de1290118..8212f592396 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RSA.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RSA.cs @@ -7,11 +7,7 @@ // // (C) 2002 // Portions (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com) -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -33,14 +29,17 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; using System.Globalization; +using System.Runtime.InteropServices; using System.Text; using Mono.Xml; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class RSA : AsymmetricAlgorithm { public static new RSA Create () diff --git a/mcs/class/corlib/System.Security.Cryptography/RSACryptoServiceProvider.cs b/mcs/class/corlib/System.Security.Cryptography/RSACryptoServiceProvider.cs index fe16408076f..c3cf93d1a50 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RSACryptoServiceProvider.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RSACryptoServiceProvider.cs @@ -7,7 +7,7 @@ // // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com) // Portions (C) 2003 Ben Maurer -// 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 @@ -36,7 +36,8 @@ using Mono.Security.Cryptography; namespace System.Security.Cryptography { -#if (NET_2_0) +#if NET_2_0 + [ComVisible (true)] public sealed class RSACryptoServiceProvider : RSA, ICspAsymmetricAlgorithm { #else public sealed class RSACryptoServiceProvider : RSA { diff --git a/mcs/class/corlib/System.Security.Cryptography/RSAOAEPKeyExchangeDeformatter.cs b/mcs/class/corlib/System.Security.Cryptography/RSAOAEPKeyExchangeDeformatter.cs index d748ef1133a..be624743d18 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RSAOAEPKeyExchangeDeformatter.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RSAOAEPKeyExchangeDeformatter.cs @@ -28,10 +28,14 @@ // using System.Globalization; +using System.Runtime.InteropServices; using Mono.Security.Cryptography; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public class RSAOAEPKeyExchangeDeformatter : AsymmetricKeyExchangeDeformatter { private RSA rsa; diff --git a/mcs/class/corlib/System.Security.Cryptography/RSAOAEPKeyExchangeFormatter.cs b/mcs/class/corlib/System.Security.Cryptography/RSAOAEPKeyExchangeFormatter.cs index 2c18e4c062b..73978afe039 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RSAOAEPKeyExchangeFormatter.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RSAOAEPKeyExchangeFormatter.cs @@ -28,10 +28,14 @@ // using System.Globalization; +using System.Runtime.InteropServices; using Mono.Security.Cryptography; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public class RSAOAEPKeyExchangeFormatter : AsymmetricKeyExchangeFormatter { private RSA rsa; diff --git a/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1KeyExchangeDeformatter.cs b/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1KeyExchangeDeformatter.cs index de08fc94444..7035ad2fa0e 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1KeyExchangeDeformatter.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1KeyExchangeDeformatter.cs @@ -5,11 +5,7 @@ // Sebastien Pouliot // // (C) 2002 Motus Technologies Inc. (http://www.motus.com) -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -31,12 +27,15 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; using System.Globalization; +using System.Runtime.InteropServices; using Mono.Security.Cryptography; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public class RSAPKCS1KeyExchangeDeformatter : AsymmetricKeyExchangeDeformatter { private RSA rsa; diff --git a/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1KeyExchangeFormatter.cs b/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1KeyExchangeFormatter.cs index e87d4edee9f..8214690d439 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1KeyExchangeFormatter.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1KeyExchangeFormatter.cs @@ -28,6 +28,7 @@ // using System.Globalization; +using System.Runtime.InteropServices; using Mono.Security.Cryptography; namespace System.Security.Cryptography { @@ -35,6 +36,9 @@ namespace System.Security.Cryptography { // LAMESPEC: There seems no way to select a hash algorithm. The default // algorithm, is SHA1 because the class use the PKCS1MaskGenerationMethod - // which default to SHA1. +#if NET_2_0 + [ComVisible (true)] +#endif public class RSAPKCS1KeyExchangeFormatter: AsymmetricKeyExchangeFormatter { private RSA rsa; diff --git a/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1SignatureDeformatter.cs b/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1SignatureDeformatter.cs index 3da5da568f8..ef33e1366fa 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1SignatureDeformatter.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1SignatureDeformatter.cs @@ -28,10 +28,14 @@ // using System.Globalization; +using System.Runtime.InteropServices; using Mono.Security.Cryptography; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public class RSAPKCS1SignatureDeformatter : AsymmetricSignatureDeformatter { private RSA rsa; diff --git a/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1SignatureFormatter.cs b/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1SignatureFormatter.cs index 3ae6ac5ae33..df4323ad37d 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1SignatureFormatter.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RSAPKCS1SignatureFormatter.cs @@ -27,10 +27,14 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +using System.Runtime.InteropServices; using Mono.Security.Cryptography; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public class RSAPKCS1SignatureFormatter : AsymmetricSignatureFormatter { private RSA rsa; diff --git a/mcs/class/corlib/System.Security.Cryptography/RSAParameters.cs b/mcs/class/corlib/System.Security.Cryptography/RSAParameters.cs index 6da7398c709..66b62d18086 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RSAParameters.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RSAParameters.cs @@ -5,10 +5,7 @@ // Dan Lewis (dihlewis@yahoo.co.uk) // // (C) 2002 -// - -// -// 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 @@ -30,11 +27,14 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { [Serializable] +#if NET_2_0 + [ComVisible (true)] +#endif public struct RSAParameters { [NonSerialized] public byte[] P; diff --git a/mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs b/mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs index aaa6819016c..fd549bb5eb7 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs @@ -5,11 +5,7 @@ // Duco Fijma (duco@lorentz.xs4all.nl) // // (C) 2002 Duco Fijma -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -31,8 +27,13 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +using System.Runtime.InteropServices; + namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class RandomNumberGenerator { public RandomNumberGenerator () diff --git a/mcs/class/corlib/System.Security.Cryptography/Rfc2898DeriveBytes.cs b/mcs/class/corlib/System.Security.Cryptography/Rfc2898DeriveBytes.cs index 65232d80874..6d8d94e415d 100644 --- a/mcs/class/corlib/System.Security.Cryptography/Rfc2898DeriveBytes.cs +++ b/mcs/class/corlib/System.Security.Cryptography/Rfc2898DeriveBytes.cs @@ -29,12 +29,14 @@ #if NET_2_0 +using System.Runtime.InteropServices; using System.Text; using Mono.Security.Cryptography; namespace System.Security.Cryptography { + [ComVisible (true)] public class Rfc2898DeriveBytes : DeriveBytes { private const int defaultIterations = 1000; diff --git a/mcs/class/corlib/System.Security.Cryptography/Rijndael.cs b/mcs/class/corlib/System.Security.Cryptography/Rijndael.cs index dabcda01e6f..7b156ec428d 100644 --- a/mcs/class/corlib/System.Security.Cryptography/Rijndael.cs +++ b/mcs/class/corlib/System.Security.Cryptography/Rijndael.cs @@ -5,11 +5,7 @@ // Andrew Birkett (andy@nobugs.org) // // (C) 2002 -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -31,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { @@ -39,6 +35,9 @@ namespace System.Security.Cryptography { // a. FIPS PUB 197: Advanced Encryption Standard // http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class Rijndael : SymmetricAlgorithm { public static new Rijndael Create () diff --git a/mcs/class/corlib/System.Security.Cryptography/RijndaelManaged.cs b/mcs/class/corlib/System.Security.Cryptography/RijndaelManaged.cs index cc105962836..604a5de2032 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RijndaelManaged.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RijndaelManaged.cs @@ -8,11 +8,7 @@ // // (C) 2002 // Portions (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com) -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -34,7 +30,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; +using System.Runtime.InteropServices; using Mono.Security.Cryptography; namespace System.Security.Cryptography { @@ -43,6 +39,9 @@ namespace System.Security.Cryptography { // a. FIPS PUB 197: Advanced Encryption Standard // http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf +#if NET_2_0 + [ComVisible (true)] +#endif public sealed class RijndaelManaged : Rijndael { public RijndaelManaged () diff --git a/mcs/class/corlib/System.Security.Cryptography/RijndaelManagedTransform.cs b/mcs/class/corlib/System.Security.Cryptography/RijndaelManagedTransform.cs index 561503b8bb7..bee2279cdae 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RijndaelManagedTransform.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RijndaelManagedTransform.cs @@ -4,7 +4,7 @@ // Author: // Sebastien Pouliot // -// 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 @@ -28,7 +28,7 @@ #if NET_2_0 -using System; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { @@ -37,6 +37,7 @@ namespace System.Security.Cryptography { // (and more general) one (RijndaelTransform) located in // RijndaelManaged.cs. + [ComVisible (true)] public sealed class RijndaelManagedTransform: ICryptoTransform, IDisposable { private RijndaelTransform _st; diff --git a/mcs/class/corlib/System.Security.Cryptography/SHA1.cs b/mcs/class/corlib/System.Security.Cryptography/SHA1.cs index 8a2689b3026..ed305e3dfcf 100644 --- a/mcs/class/corlib/System.Security.Cryptography/SHA1.cs +++ b/mcs/class/corlib/System.Security.Cryptography/SHA1.cs @@ -7,11 +7,7 @@ // // Copyright 2001 by Matthew S. Ford. // Portions (C) 2002 Motus Technologies Inc. (http://www.motus.com) -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -32,9 +28,14 @@ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // + +using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class SHA1 : HashAlgorithm { protected SHA1 () diff --git a/mcs/class/corlib/System.Security.Cryptography/SHA1CryptoServiceProvider.cs b/mcs/class/corlib/System.Security.Cryptography/SHA1CryptoServiceProvider.cs index 4e73b4e524b..9f5c9db6260 100644 --- a/mcs/class/corlib/System.Security.Cryptography/SHA1CryptoServiceProvider.cs +++ b/mcs/class/corlib/System.Security.Cryptography/SHA1CryptoServiceProvider.cs @@ -35,6 +35,8 @@ // Mono must provide those two class for binary compatibility. // In our case both class are wrappers around a managed internal class SHA1Internal. +using System.Runtime.InteropServices; + namespace System.Security.Cryptography { internal class SHA1Internal { @@ -439,6 +441,9 @@ namespace System.Security.Cryptography { } } +#if NET_2_0 + [ComVisible (true)] +#endif public sealed class SHA1CryptoServiceProvider : SHA1 { private SHA1Internal sha; diff --git a/mcs/class/corlib/System.Security.Cryptography/SHA1Managed.cs b/mcs/class/corlib/System.Security.Cryptography/SHA1Managed.cs index e4a2089e369..77679567d52 100644 --- a/mcs/class/corlib/System.Security.Cryptography/SHA1Managed.cs +++ b/mcs/class/corlib/System.Security.Cryptography/SHA1Managed.cs @@ -5,11 +5,7 @@ // Sebastien Pouliot (sebastien@ximian.com) // // (C) 2002 Motus Technologies Inc. (http://www.motus.com) -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -31,6 +27,8 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +using System.Runtime.InteropServices; + namespace System.Security.Cryptography { // Note: @@ -40,32 +38,33 @@ namespace System.Security.Cryptography { // Mono must provide those two class for binary compatibility. // In our case both class are wrappers around a managed internal class SHA1Internal. -public class SHA1Managed : SHA1 { +#if NET_2_0 + [ComVisible (true)] +#endif + public class SHA1Managed : SHA1 { - private SHA1Internal sha; + private SHA1Internal sha; - public SHA1Managed () - { - sha = new SHA1Internal (); - } + public SHA1Managed () + { + sha = new SHA1Internal (); + } - protected override void HashCore (byte[] rgb, int start, int size) - { - State = 1; - sha.HashCore (rgb, start, size); - } + protected override void HashCore (byte[] rgb, int start, int size) + { + State = 1; + sha.HashCore (rgb, start, size); + } - protected override byte[] HashFinal () - { - State = 0; - return sha.HashFinal (); - } + protected override byte[] HashFinal () + { + State = 0; + return sha.HashFinal (); + } - public override void Initialize () - { - sha.Initialize (); + public override void Initialize () + { + sha.Initialize (); + } } } - -} - diff --git a/mcs/class/corlib/System.Security.Cryptography/SHA256.cs b/mcs/class/corlib/System.Security.Cryptography/SHA256.cs index dcbcced48d1..7003449fec8 100644 --- a/mcs/class/corlib/System.Security.Cryptography/SHA256.cs +++ b/mcs/class/corlib/System.Security.Cryptography/SHA256.cs @@ -7,11 +7,7 @@ // // Copyright 2001 by Matthew S. Ford. // Portions (C) 2002 Motus Technologies Inc. (http://www.motus.com) -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -32,9 +28,14 @@ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // + +using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class SHA256 : HashAlgorithm { public SHA256 () diff --git a/mcs/class/corlib/System.Security.Cryptography/SHA256Managed.cs b/mcs/class/corlib/System.Security.Cryptography/SHA256Managed.cs index 82cc6672a52..52fada0ee32 100644 --- a/mcs/class/corlib/System.Security.Cryptography/SHA256Managed.cs +++ b/mcs/class/corlib/System.Security.Cryptography/SHA256Managed.cs @@ -27,8 +27,13 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +using System.Runtime.InteropServices; + namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public class SHA256Managed : SHA256 { private const int BLOCK_SIZE_BYTES = 64; diff --git a/mcs/class/corlib/System.Security.Cryptography/SHA384.cs b/mcs/class/corlib/System.Security.Cryptography/SHA384.cs index 2240e862c53..8e56c38b8cd 100644 --- a/mcs/class/corlib/System.Security.Cryptography/SHA384.cs +++ b/mcs/class/corlib/System.Security.Cryptography/SHA384.cs @@ -7,11 +7,7 @@ // // Copyright 2001 by Matthew S. Ford. // Portions (C) 2002 Motus Technologies Inc. (http://www.motus.com) -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -32,9 +28,14 @@ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // + +using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class SHA384 : HashAlgorithm { public SHA384 () diff --git a/mcs/class/corlib/System.Security.Cryptography/SHA384Managed.cs b/mcs/class/corlib/System.Security.Cryptography/SHA384Managed.cs index 60accca2375..45eb1551e1d 100644 --- a/mcs/class/corlib/System.Security.Cryptography/SHA384Managed.cs +++ b/mcs/class/corlib/System.Security.Cryptography/SHA384Managed.cs @@ -8,11 +8,7 @@ // (C) 2002 // Implementation translated from Bouncy Castle JCE (http://www.bouncycastle.org/) // See bouncycastle.txt for license. -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -34,10 +30,13 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 +[ComVisible (true)] +#endif public class SHA384Managed : SHA384 { private byte[] xBuf; diff --git a/mcs/class/corlib/System.Security.Cryptography/SHA512.cs b/mcs/class/corlib/System.Security.Cryptography/SHA512.cs index a99165fdce0..e833f637373 100644 --- a/mcs/class/corlib/System.Security.Cryptography/SHA512.cs +++ b/mcs/class/corlib/System.Security.Cryptography/SHA512.cs @@ -7,11 +7,7 @@ // // Copyright 2001 by Matthew S. Ford. // Portions (C) 2002 Motus Technologies Inc. (http://www.motus.com) -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -32,9 +28,14 @@ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // + +using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class SHA512 : HashAlgorithm { public SHA512 () diff --git a/mcs/class/corlib/System.Security.Cryptography/SHA512Managed.cs b/mcs/class/corlib/System.Security.Cryptography/SHA512Managed.cs index f74d6318c2b..44584ac4485 100644 --- a/mcs/class/corlib/System.Security.Cryptography/SHA512Managed.cs +++ b/mcs/class/corlib/System.Security.Cryptography/SHA512Managed.cs @@ -8,11 +8,7 @@ // (C) 2002 // Implementation translated from Bouncy Castle JCE (http://www.bouncycastle.org/) // See bouncycastle.txt for license. -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -34,10 +30,13 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 +[ComVisible (true)] +#endif public class SHA512Managed : SHA512 { private byte[] xBuf; diff --git a/mcs/class/corlib/System.Security.Cryptography/SHAConstants.cs b/mcs/class/corlib/System.Security.Cryptography/SHAConstants.cs index c8f5dbea2a2..8e907f1c399 100644 --- a/mcs/class/corlib/System.Security.Cryptography/SHAConstants.cs +++ b/mcs/class/corlib/System.Security.Cryptography/SHAConstants.cs @@ -1,11 +1,7 @@ // // System.Security.Cryptography.SHAConstants.cs // -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -29,13 +25,16 @@ namespace System.Security.Cryptography { +#if NET_2_0 + internal static class SHAConstants { +#else internal sealed class SHAConstants { private SHAConstants () { // Never instantiated. } - +#endif // SHA-256 Constants // Represent the first 32 bits of the fractional parts of the // cube roots of the first sixty-four prime numbers diff --git a/mcs/class/corlib/System.Security.Cryptography/SignatureDescription.cs b/mcs/class/corlib/System.Security.Cryptography/SignatureDescription.cs index 37fb8ac64a8..d6e938a5bac 100644 --- a/mcs/class/corlib/System.Security.Cryptography/SignatureDescription.cs +++ b/mcs/class/corlib/System.Security.Cryptography/SignatureDescription.cs @@ -6,11 +6,7 @@ // Sebastien Pouliot // // Portions (C) 2002 Motus Technologies Inc. (http://www.motus.com) -// (C) 2004 Novell (http://www.novell.com) -// - -// -// 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 @@ -37,12 +33,15 @@ // http://www.csharpfriends.com/Members/Main/Classes/get_class.aspx?assembly=mscorlib,%20Version=1.0.3300.0,%20Culture=neutral,%20PublicKeyToken=b77a5c561934e089&namespace=System.Security.Cryptography&class=SignatureDescription // Those 2 classes are returned by CryptoConfig.CreateFromName and used in XMLDSIG -using System; using System.Globalization; +using System.Runtime.InteropServices; using System.Security; namespace System.Security.Cryptography { +#if NET_2_0 +[ComVisible (true)] +#endif public class SignatureDescription { private string _DeformatterAlgorithm; diff --git a/mcs/class/corlib/System.Security.Cryptography/SymmetricAlgorithm.cs b/mcs/class/corlib/System.Security.Cryptography/SymmetricAlgorithm.cs index 49894ab8994..85d220c129b 100644 --- a/mcs/class/corlib/System.Security.Cryptography/SymmetricAlgorithm.cs +++ b/mcs/class/corlib/System.Security.Cryptography/SymmetricAlgorithm.cs @@ -29,10 +29,14 @@ // using System.Globalization; +using System.Runtime.InteropServices; using Mono.Security.Cryptography; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public abstract class SymmetricAlgorithm : IDisposable { protected int BlockSizeValue; protected int FeedbackSizeValue; diff --git a/mcs/class/corlib/System.Security.Cryptography/ToBase64Transform.cs b/mcs/class/corlib/System.Security.Cryptography/ToBase64Transform.cs index 0d6a8c4b4c0..382db461c55 100644 --- a/mcs/class/corlib/System.Security.Cryptography/ToBase64Transform.cs +++ b/mcs/class/corlib/System.Security.Cryptography/ToBase64Transform.cs @@ -5,7 +5,7 @@ // Sergey Chaban (serge@wildwestsoftware.com) // // (C) 2004 Novell (http://www.novell.com) -// 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 @@ -28,9 +28,13 @@ // using System.Globalization; +using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public class ToBase64Transform : ICryptoTransform { private bool m_disposed; diff --git a/mcs/class/corlib/System.Security.Cryptography/TripleDES.cs b/mcs/class/corlib/System.Security.Cryptography/TripleDES.cs index 7d6980cdf82..8d7e664d8e1 100644 --- a/mcs/class/corlib/System.Security.Cryptography/TripleDES.cs +++ b/mcs/class/corlib/System.Security.Cryptography/TripleDES.cs @@ -5,7 +5,7 @@ // Sebastien Pouliot // // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com) -// 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 @@ -27,8 +27,8 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; using System.Globalization; +using System.Runtime.InteropServices; using System.Security.Cryptography; namespace System.Security.Cryptography { @@ -40,6 +40,9 @@ namespace System.Security.Cryptography { // not free :-( // http://webstore.ansi.org/ansidocstore/product.asp?sku=ANSI+X9%2E52%2D1998 +#if NET_2_0 +[ComVisible (true)] +#endif public abstract class TripleDES : SymmetricAlgorithm { public TripleDES () diff --git a/mcs/class/corlib/System.Security.Cryptography/TripleDESCryptoServiceProvider.cs b/mcs/class/corlib/System.Security.Cryptography/TripleDESCryptoServiceProvider.cs index cf9a6f74685..09384a734a7 100644 --- a/mcs/class/corlib/System.Security.Cryptography/TripleDESCryptoServiceProvider.cs +++ b/mcs/class/corlib/System.Security.Cryptography/TripleDESCryptoServiceProvider.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; +using System.Runtime.InteropServices; using Mono.Security.Cryptography; namespace System.Security.Cryptography { @@ -39,6 +39,9 @@ namespace System.Security.Cryptography { // not free :-( // http://webstore.ansi.org/ansidocstore/product.asp?sku=ANSI+X9%2E52%2D1998 +#if NET_2_0 + [ComVisible (true)] +#endif public sealed class TripleDESCryptoServiceProvider : TripleDES { public TripleDESCryptoServiceProvider () -- 2.25.1