Commit Graph
22 Commits
Author SHA1 Message Date
Sebastien Pouliot 16dbea555d Revert "Missing Args checks."
This reverts commit 8b9c60075f.
2014-10-02 13:44:35 -04:00
Marc-Andre Ferland 8b9c60075f Missing Args checks. 2014-09-14 00:28:33 -04:00
Sebastien Pouliot 3a4876210d Get better linker results when doing full-aot wrt the cryptographic stack 2012-11-07 11:56:24 -05:00
Rodrigo Kumpera bbb7592661 Make the Crypto stack work with Full AOT.
* System.Security.Cryptography.*cs: To make Crypto work with
	Full AOT we remove the usage of providers and reflection. We hardcode
	the default algorithms for hashing, rng and symmetric cyphers.
2012-11-06 18:18:16 -05: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
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
Andreas N ca4b3b3ea2 2008-07-03 Andreas Nahr <[email protected]>
* SHA512Managed.cs:
	* SHA384Managed.cs:
	* SHA256Managed.cs:
	* SHA1Managed.cs:
	* SHA1CryptoServiceProvider.cs:
	* RSAPKCS1KeyExchangeDeformatter.cs:
	* RSACryptoServiceProvider.cs:
	* RSA.cs:
	* RIPEMD160Managed.cs:
	* RC2.cs:
	* PKCS1MaskGenerationMethod.cs:
	* MD5CryptoServiceProvider.cs:
	* MD5.cs:
	* MACTripleDES.cs:
	* HMACSHA512.cs:
	* HMACSHA384.cs:
	* HMACSHA256.cs:
	* HMACSHA1.cs:
	* HMACRIPEMD160.cs:
	* HMACMD5.cs:
	* HMAC.cs:
	* HashAlgorithm.cs:
	* FromBase64Transform.cs:
	* DSACryptoServiceProvider.cs:
	* DES.cs:
	* CspParameters.cs: Fix parameter names

svn path=/trunk/mcs/; revision=107126
2008-07-02 23:56:08 +00:00
Sebastien Pouliot 674af570bf 2006-06-15 Sebastien Pouliot <[email protected]>
* HashAlgorithm.cs: Changed the order of BlockCopy + HashCore to
	HashCore + BlockCopy. Fx 2.0 now allows using a null output buffer
	(without exception) while previous 1.x versions crashed the runtime
	(mono won't crash the runtime, so we always do like 2.0).


svn path=/trunk/mcs/; revision=61765
2006-06-15 19:15:17 +00:00
Sebastien Pouliot 129324b2ca 2006-05-30 Sebastien Pouliot <[email protected]>
* AsymmetricKeyExchangeDeformatter.cs: Under 2.0 the ctor is 
	protected.
	* AsymmetricKeyExchangeFormatter.cs: Under 2.0 the ctor is protected.
	* AsymmetricSignatureDeformatter.cs: Under 2.0 the ctor is protected.
	* AsymmetricSignatureFormatter.cs: Under 2.0 the ctor is protected.
	* DES.cs: Under 2.0 the ctor is protected.
	* HashAlgorithm.cs: Under 2.0 the HashValue field is protected 
	internal.
	* RandomNumberGenerator.cs: Under 2.0 the ctor is protected.
	* RC2.cs: Under 2.0 the ctor is protected.
	* Rijndael.cs: Under 2.0 the ctor is protected.
	* RSA.cs: Under 2.0 the ctor is protected.
	* SHA256.cs: Under 2.0 the ctor is protected.
	* SHA384.cs: Under 2.0 the ctor is protected.
	* SHA512.cs: Under 2.0 the ctor is protected.
	* SymmetricAlgorithm.cs: Under 2.0 the ctor is protected.
	* TripleDES.cs: Under 2.0 the ctor is protected.


svn path=/trunk/mcs/; revision=61270
2006-05-30 17:57:47 +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
Sebastien Pouliot 7e0b188fe3 2004-05-27 Sebastien Pouliot <[email protected]>
* HashAlgorithm.cs: Added missing exception handling to ComputeHash,
	TransformBlock and TransformFinalBlock.

svn path=/trunk/mcs/; revision=28252
2004-05-27 11:47:56 +00:00
Sebastien Pouliot dc581bf25d 2004-05-05 Sebastien Pouliot <[email protected]>
* HashAlgorithm.cs: Moved XML comments to monodoc. Added globalization
	to exceptions.
	* KeyedHashAlgorithm.cs: Added globalization to exceptions.
	* KeySizes.cs: Moved XML comments to monodoc.
	* MaskGenerationMethod.cs: Source clean up.
	* MD5.cs: Moved XML comments to monodoc.
	* MD5CryptoServiceProvider.cs: Removed CLSCompliance attributes from
	private fields. Changed constants from enum to array. Zeroize data on
	Dispose.
	* PaddingMode.cs: Moved XML comments to monodoc.
	* PasswordDeriveBytes.cs: Added globalization to exceptions. Removed
	TODO and documented as "not supported" in MonoDoc.
	* RandomNumberGenerator.cs: Source clean up.

svn path=/trunk/mcs/; revision=26773
2004-05-05 17:40:22 +00:00
Sebastien Pouliot b154f2716b 2004-02-08 Sebastien Pouliot <[email protected]>
* HashAlgorithm.cs: Changed the ComputeHash(Stream) method to (a) not
	allocate the whole stream memory (big memory saver as suggested by
	Peter Williams in bugzilla entry #54022) and (b) to never use Stream.
	Length and Stream.Position because they aren't implemented for every
	stream class (similar issue to the CryptoStream patch).
	* MD5CryptoServiceProvider.cs: Moved a buffer allocation from
	ProcessBlock to constructor to reduce memory allocation. Optimization
	suggested by Peter Williams in bugzilla entry #54024.

svn path=/trunk/mcs/; revision=22881
2004-02-08 15:53:33 +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 d1753e90d0 2002-10-12 Sebastien Pouliot <[email protected]>
* DSA.cs: changed constructor to public from internal (like MS)
	* HashAlgorithm.cs: Completed ComputeHash methods
	* SHA1.cs: Added HashSizeValue = 160

svn path=/trunk/mcs/; revision=8208
2002-10-13 03:13:08 +00:00
Sebastien Pouliot f309618e5c 2002-10-12 Sebastien Pouliot <[email protected]>
* HashAlgorithm.cs: Added Dispose() to HashAlgorithm because it inherits ICryptoTransform

svn path=/trunk/mcs/; revision=8200
2002-10-12 18:24:54 +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
Miguel de Icaza baa39453fc Matthew Ford's initial implementation and test classes for
System.Security.Cryptography.

svn path=/trunk/mcs/; revision=371
2001-08-01 23:05:07 +00:00