Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Pouliot <sebastien@ximian.com>2004-04-27 02:42:53 +0400
committerSebastien Pouliot <sebastien@ximian.com>2004-04-27 02:42:53 +0400
commit56a1dfe6e8bb41a9002cad6a01977143b0129b64 (patch)
tree31832ee3a842466ed90556df5330c81fb65f6438 /mcs/class/corlib/System.Security.Cryptography/AsymmetricAlgorithm.cs
parent2d7e6af086180d13f9c960f4321ce93276f29d6d (diff)
2004-04-26 Sebastien Pouliot <sebastien@ximian.com>
* AsymmetricAlgorithm.cs: Moved XML comments to monodoc. Added globalization to exceptions. Already had 100% coverage. * AsymmetricKeyExchangeDeformatter.cs: Moved XML comments to monodoc. Already had 100% coverage. * AsymmetricKeyExchangeFormatter.cs: Moved XML comments to monodoc. Already had 100% coverage. * AsymmetricSignatureDeformatter.cs: Moved XML comments to monodoc. Already had 100% coverage. * AsymmetricSignatureFormatter.cs: Moved XML comments to monodoc. Already had 100% coverage. * CryptoAPITransform.cs: Unused by Mono (added note to monodoc). Class will stay at 0% coverage. * CryptoConfig.cs: Added globalization to exceptions. 98% coverage. * CryptographicException.cs: Added globalization to exceptions. Already had 100% coverage. * CryptoStream.cs: Added globalization to exceptions. Removed (unused) field _previousBlock to get 100% coverage. * CspParameters.cs: Moved XML comments to monodoc. Already had 100% coverage. * CspProviderFlags.cs: Moved XML comments to monodoc. * DeriveBytes.cs: Moved XML comments to monodoc. Already had 100% coverage. svn path=/trunk/mcs/; revision=26022
Diffstat (limited to 'mcs/class/corlib/System.Security.Cryptography/AsymmetricAlgorithm.cs')
-rwxr-xr-xmcs/class/corlib/System.Security.Cryptography/AsymmetricAlgorithm.cs56
1 files changed, 15 insertions, 41 deletions
diff --git a/mcs/class/corlib/System.Security.Cryptography/AsymmetricAlgorithm.cs b/mcs/class/corlib/System.Security.Cryptography/AsymmetricAlgorithm.cs
index 94115c1693e..faf002a9120 100755
--- a/mcs/class/corlib/System.Security.Cryptography/AsymmetricAlgorithm.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/AsymmetricAlgorithm.cs
@@ -3,59 +3,47 @@
//
// Authors:
// Thomas Neidhart (tome@sbox.tugraz.at)
-// Sebastien Pouliot (spouliot@motus.com)
+// Sebastien Pouliot (sebastien@ximian.com)
//
// Portions (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
+// (C) 2004 Novell (http://www.novell.com)
//
using System;
+using System.Globalization;
namespace System.Security.Cryptography {
- /// <summary>
- /// Abstract base class for all cryptographic asymmetric algorithms.
- /// Available algorithms include:
- /// RSA, DSA
- /// </summary>
public abstract class AsymmetricAlgorithm : IDisposable {
- protected int KeySizeValue; // The size of the secret key used by the symmetric algorithm in bits.
- protected KeySizes[] LegalKeySizesValue; // Specifies the key sizes that are supported by the symmetric algorithm.
+ protected int KeySizeValue;
+ protected KeySizes[] LegalKeySizesValue;
- /// <summary>
- /// Called from constructor of derived class.
- /// </summary>
- protected AsymmetricAlgorithm () {}
+ protected AsymmetricAlgorithm ()
+ {
+ }
- /// <summary>
- /// Gets the key exchange algorithm
- /// </summary>
- public abstract string KeyExchangeAlgorithm {get;}
+ public abstract string KeyExchangeAlgorithm {
+ get;
+ }
- /// <summary>
- /// Gets or sets the actual key size
- /// </summary>
public virtual int KeySize {
get { return this.KeySizeValue; }
set {
if (!KeySizes.IsLegalKeySize (this.LegalKeySizesValue, value))
- throw new CryptographicException("key size not supported by algorithm");
+ throw new CryptographicException (Locale.GetText ("Key size not supported by algorithm."));
this.KeySizeValue = value;
}
}
- /// <summary>
- /// Gets all legal key sizes
- /// </summary>
public virtual KeySizes[] LegalKeySizes {
get { return this.LegalKeySizesValue; }
}
- /// <summary>
- /// Gets the signature algorithm
- /// </summary>
- public abstract string SignatureAlgorithm {get;}
+ public abstract string SignatureAlgorithm {
+ get;
+ }
void IDisposable.Dispose ()
{
@@ -70,32 +58,18 @@ namespace System.Security.Cryptography {
protected abstract void Dispose (bool disposing);
- /// <summary>
- /// Reconstructs the AsymmetricAlgorithm Object from an XML-string
- /// </summary>
public abstract void FromXmlString (string xmlString);
- /// <summary>
- /// Returns an XML string representation the current AsymmetricAlgorithm object
- /// </summary>
public abstract string ToXmlString (bool includePrivateParameters);
- /// <summary>
- /// Creates the default implementation of the default asymmetric algorithm (RSA).
- /// </summary>
public static AsymmetricAlgorithm Create ()
{
return Create ("System.Security.Cryptography.AsymmetricAlgorithm");
}
- /// <summary>
- /// Creates a specific implementation of the given asymmetric algorithm.
- /// </summary>
- /// <param name="algo">Specifies which derived class to create</param>
public static AsymmetricAlgorithm Create (string algName)
{
return (AsymmetricAlgorithm) CryptoConfig.CreateFromName (algName);
}
}
}
-