Commit Graph
22 Commits
Author SHA1 Message Date
Sebastien Pouliot b176adcc0e Do not bring (linking-wise) most of ToBase64Transform when Convert.ToBase64String is used 2013-05-17 11:10:13 -04:00
Sebastien Pouliot 940bdeca94 Match IDisposable with 4.0 changes in System.Security.Cryptography
* AsymmetricAlgorithm.cs:
* CryptoAPITransform.cs:
* DeriveBytes.cs:
* FromBase64Transform.cs:
* HashAlgorithm.cs:
* PasswordDeriveBytes.cs:
* Rfc2898DeriveBytes.cs:
* RijndaelManagedTransform.cs:
* SymmetricAlgorithm.cs:
* ToBase64Transform.cs:
	Adjust changes to IDisposable wrt 4.0
2011-05-02 12:14:53 -04:00
Sebastien Pouliot a2e11561a7 In System:
2010-01-07  Sebastien Pouliot  <[email protected]>

	* Convert.cs: Fix line endings in ToBase64String (bug #568778)
	and also the default line length. Code changed to not require
	a BinaryReader over a MemoryStream to reduce memory requirements.

In Test/System:
2010-01-07  Sebastien Pouliot  <[email protected]>

	* ConvertTest.cs: Add test case for #568778 and the default
	line length.

In System.Security.Cryptography:
2010-01-07  Sebastien Pouliot  <[email protected]>

	* ToBase64Transform.cs: Static-ify some methods to make it easier 
	to use from System.Convert


svn path=/trunk/mcs/; revision=149171
2010-01-07 15:22:08 +00:00
Miguel de Icaza 3c39ac4586 Jumbo patch for NET_2_0, mscorlib is now clean
svn path=/trunk/mcs/; revision=145621
2009-11-06 22:23:59 +00:00
Sebastien Pouliot ccfef2f152 2005-06-10 Sebastien Pouliot <[email protected]>
* all: 2.0 beta2 fixes, i.e. mostly added [ComVisible(true)]


svn path=/trunk/mcs/; revision=45759
2005-06-10 14:42:08 +00:00
Sebastien Pouliot 856abd7608 2005-01-10 Sebastien Pouliot <[email protected]>
* CryptoConfig.cs: Change the OID for SHA-2 algorithms to match 2.0
	and added new OID for asymmetric and symmetric algorithms.
	* CspKeyContainerInfo.cs: Added CryptoKeySecurity property. This will
	always return null until we support access control for key containers.
	* CspParameters.cs: Added new constructors and propertys for access 
	control and password (2.0).
	* DSASignatureDeformatter.cs: Throw ArgumentNullException in NET_2_0 
	if a null key is specified.
	* DSASignatureFormatter.cs: Throw ArgumentNullException in NET_2_0 if
	a null key is specified.
	* HashAlgorithm.cs: Fix the reported exceptions for output buffers.
	* HMAC.cs: Change the .Clear (which calls Dispose) to a .Initialize.
	* MACTripleDES.cs: Removed unrequired private field _padding.
	* PasswordDeriveBytes.cs: Added 4 new constructors where the password
	is a byte[] (as it seems MS won't be using SecureString for this).
	* RIPEMD160Managed.cs: Removed overriden Dispose method to match 2.0.
	Clear buffers when initializing (e.g. re-using the hash instance).
	* Rfc2898DeriveBytes.cs: Added a new constructor where the password
	is a byte[] (as it seems MS won't be using SecureString for this).
	* RSAPKCS1SignatureDeformatter.cs: Throw ArgumentNullException in
	NET_2_0 if a null key is specified.
	* RSAPKCS1SignatureFormatter.cs: Throw ArgumentNullException in
	NET_2_0 if a null key is specified.
	* ToBase64Transform.cs: Fix the reported exceptions for output buffers.


svn path=/trunk/mcs/; revision=38667
2005-01-11 01:18:39 +00:00
Duncan Mak 13d1764537 Add license and copyright to all source files in corlib
svn path=/trunk/mcs/; revision=29249
2004-06-11 02:09:36 +00:00
Gert Driesen ae23e8d4e5 * ToBase64Transform.cs: Uncomment finalizer to fix public API
signature

svn path=/trunk/mcs/; revision=29204
2004-06-10 17:00:23 +00:00
Sebastien Pouliot 2318a431a0 2004-05-26 Sebastien Pouliot <[email protected]>
* CryptoStream.cs: Fixed possible integer overflow.
	* FromBase64Transform.cs: Better exception handling and fixed possible
	integer overflow.
	* ToBase64Transform.cs: Better exception handling and fixed possible
	integer overflow.

svn path=/trunk/mcs/; revision=28213
2004-05-27 01:05:57 +00:00
Sebastien Pouliot 0c98b10471 2004-05-07 Sebastien Pouliot <[email protected]>
* ToBase64Transform.cs: Input block may be smaller than a full block
	when calling TransformFinalBlock (fix 2 CryptoStream unit tests).

svn path=/trunk/mcs/; revision=26911
2004-05-07 13:02:24 +00:00
Sebastien Pouliot e7cc9f30bc 2004-05-06 Sebastien Pouliot <[email protected]>
* RNGCryptoServiceProvider.cs: Removed TODO and documented them in
	mono doc. Now call runtime when a seed is provided.
	* RSA.cs: Added globalization to exceptions. Removed check for
	<RSAKeyValue> as it is not checked by MS implementation.
	* SignatureDescription.cs: Moved XML comments to monodoc. Added
	globalization to exceptions. Removed TODO and added notes to monodoc.
	* SymmetricAlgorithm.cs: Moved XML comments to monodoc. Added
	globalization to exceptions.
	* ToBase64Tranform.cs: Added missing exception handling. Moved XML
	comments to monodoc.

svn path=/trunk/mcs/; revision=26848
2004-05-06 16:31:52 +00:00
Sebastien Pouliot e57fe275fc 2004-05-05 Sebastien Pouliot <[email protected]>
* Base64Constants.cs: New. Convert code into tables for better base64
	performance.
	* FromBase64Transform.cs: Updated to use the new tables. Source code
	cleanup.
	* ToBase64Transform.cs: Updated to use the new tables. Added
	globalization. Commented finalizer as it isn't required in this case.

svn path=/trunk/mcs/; revision=26753
2004-05-05 12:46:44 +00:00
Ben Maurer 645621c057 const/readonly lovin'
svn path=/trunk/mcs/; revision=26349
2004-04-29 22:01:06 +00:00
Sebastien Pouliot a23331712f 2002-11-20 Sebastien Pouliot <[email protected]>
* AsymmetricSignatureDeformatter.cs: Added exception handling in
	VerifySignature (moved from RSAPKCS1SignatureDeformatter).
	* AsymmetricSignatureFormatter.cs: Added exception handling in
	CreateSignature (moved from RSAPKCS1SignatureFormatter).
	* CryptoAPITransform.cs: Removed "= false" assignation from a private
	member (because this created an unwanted "ghost" constructor) and
	modified Dispose declaration.
	* HashAlgorithm.cs: Removed destructor. Disposing unmanaged
	ressources is the responsability of each class (not an abstract class).
	* RSAPKCS1SignatureDeformatter.cs: Removed a VerifySignature method
	which was present in the base class AsymmetricSignatureDeformatter.
	* RSAPKCS1SignatureFormatter.cs: Removed a CreateSignature method
	which was present in the base class AsymmetricSignatureFormatter.
	* SHA1Managed.cs: Removed sealed from class declaration. Removed
	destructor and Dispose method as class is fully managed.
	* ToBase64Transform.cs: Added virtual to property CanReuseTransform.

svn path=/trunk/mcs/; revision=9122
2002-11-21 00:48:32 +00:00
Sebastien Pouliot 55a6430bfb 2002-11-15 Sebastien Pouliot <[email protected]>
* CryptographicUnexpectedOperationException.cs: Forgot it last time!
	* FromBase64Transform.cs: Added missing virtual to CanReuseTransform.
	Changed Dispose().
	* HashAlgorithm.cs: Changed Dispose().
	* MD5CryptoServiceProvider.cs: Added destructor and Dipose(bool).
	* PasswordDeriveBytes.cs: Changed some declaration from
	protected to private.
	* RC2.cs: Added valid keysize check in EffectiveKeySize.
	* RC2CryptoServiceProvider.cs: Overriden EffectiveKeySize to match
	corlib declarations.
	* RSAOAEPKeyExchangeDeformatter.cs: Changed some declaration from
	protected to private.
	* RSAOAEPKeyExchangeFormatter.cs: Changed some declaration from
	protected to private.
	* RSAPKCS1KeyExchangeDeformatter.cs: Changed some declaration from
	protected to private.
	* RSAPKCS1KeyExchangeFormatter.cs: Changed some declaration from
	protected to private.
	* RSAPKCS1SignatureDeformatter.cs: Changed some declaration from
	protected to private.
	* RSAPKCS1SignatureFormatter.cs: Changed some declaration from
	protected to private.
	* SHA1CryptoServiceProvider.cs: Moved SHA1 code to SHA1Internal.
	SHA1CryptoServiceProvider now use SHA1Internal. Added Dispose and
	destructor.
	* SHA1Managed.cs: New. Use SHA1Internal. Same as
	SHA1CryptoServiceProvider but is required for binary compatibility.
	* SHA256Managed.cs: Changed some declaration from protected to private.
	* SHA384Managed.cs: Changed some declaration from protected to private.
	* SHA512Managed.cs: Changed some declaration from protected to private.
	* SymmetricAlgorithm.cs: Added Clear(), changed Dispose() and added
	virtual to Dispose(bool).
	* ToBase64Transform.cs: Added missing virtual to CanReuseTransform.
	Changed Dispose().
	* TripleDESCryptoServiceProvider.cs: Added missing sealed to class
	declaration.

svn path=/trunk/mcs/; revision=8998
2002-11-15 14:39:21 +00:00
Sebastien Pouliot 13534bb443 2002-11-03 Sebastien Pouliot <[email protected]>
* CryptoAPITransform.cs: Added missing CanReuseTransform property,
	Clear method, destructor and IDisposable support.
	* CryptographicException.cs: Added missing protected constructor.
	* CryptographicUnexpectedOperationException.cs: Added missing
	protected constructor.
	* ICryptoTransform.cs: Added missing CanReuseTransform property.
	* FromBase64Transform.cs: Added missing CanReuseTransform property,
	Clear method, destructor and IDisposable support.
	* SymmetricAlgorithm.cs: Implement IDisposable.
	* ToBase64Transform.cs: Added missing CanReuseTransform property,
	Clear method, destructor and IDisposable support.

svn path=/trunk/mcs/; revision=8799
2002-11-03 12:40:00 +00:00
Sebastien Pouliot 579602906a 2002-10-14 Sebastien Pouliot <[email protected]>
* MD5.cs: Create using CryptoConfig, set HashSizeValue, removed TODO.
	* Rijndael.cs: Create using CryptoConfig. Removed TODO.
	* RSAParameters.cs: Modulus must be serialized. Removed TODO.
	* SHA256.cs: Create using CryptoConfig, set HashSizeValue, removed TODO.
	* SHA384.cs: Create using CryptoConfig, set HashSizeValue, removed TODO.
	* SHA512.cs: Create using CryptoConfig, set HashSizeValue, removed TODO.
	* FromBase64Transform.cs: Removed ToString()
	* ToBase64Transform.cs: Removed ToString()
	* SymmetricAlgorithm.cs: Create using CryptoConfig, set default Mode and
	Padding, added Clear, Dispose
	* TripleDES.cs: New. Abstract class.
	* MaskGenerationMethod.cs: New. Abstract class.
	* PKCS1MaskGenerationMethod.cs: New. Implement PKCS#1 MGF (currently not
	compatible with MS implementation - but not sure the bug is mine!).

svn path=/trunk/mcs/; revision=8254
2002-10-14 18:02:11 +00:00
Sebastien Pouliot da82e0e5cb 2002-10-12 Sebastien Pouliot <[email protected]>
* ICryptoTransform.cs: Now inherits from IDisposable
	* RC2CryptoServiceProvider.cs: Added Dispose() to RC2Impl because it inherits ICryptoTransform
        * CryptoAPITransform.cs: Added Dispose() to CryptoAPITransform... ICryptoTransform
        * RijndaelManaged.cs: Added Dispose() to RijndaelController...ICryptoTransform
        * FromBase64Transform.cs: Added Dispose() to FromBase64Transform...ICryptoTransform
        * ToBase64Transform.cs: Added Dispose() to ToBase64Transform...ICryptoTransform
        * DESCryptoServiceProvider.cs: Added Dispose() to DESTransformBase...ICryptoTransform

svn path=/trunk/mcs/; revision=8199
2002-10-12 16:22:31 +00:00
Piers Haken cc63806f23 minor CLS conformance tweaks (visibility, virtual, abstract, sealed, etc...)
svn path=/trunk/mcs/; revision=3568
2002-04-03 06:28:53 +00:00
Ravi Pratap M 76218d8771 2002-01-05 Ravi Pratap <[email protected]>
* CryptoAPITransform.cs, DESCryptoProvider.cs : MonoTODO attribute
	decoration.

	* HashAlgorithm.cs, MD5.cs, SHA1.cs, SHA256.cs, SHA384.cs : Ditto.

	* SHA512.cs, SymmetricAlgorithm.cs, ToBase64Transform.cs,
	AsymmetricAlgorithm.cs, CryptoStream.cs, DSA.cs, DSASignatureDeformatter.cs,
	DSASignatureFormatter.cs, SignatureDescription.cs : Ditto.

svn path=/trunk/mcs/; revision=1848
2002-01-05 06:10:24 +00:00
Sergey Chaban d653162562 Base64Table now supports both encoding and decoding tables.
svn path=/trunk/mcs/; revision=448
2001-08-09 14:10:56 +00:00
Miguel de Icaza aea66710df Added ToBase64TransformTest from Sergey
svn path=/trunk/mcs/; revision=375
2001-08-02 01:55:45 +00:00