* SHA1CryptoServiceProvider.cs: Reduce by half the number of required
memory allocations to produce a hash (in >90% of the cases) by reusing
an existing memory buffer (instead of always allocating a new one).
svn path=/trunk/mcs/; revision=77161
* DSACryptoServiceProvider.cs: Implement the ImportCspBlob and
ExportCspBlob methods by calling into CryptoConvert.
svn path=/trunk/mcs/; revision=76980
* Rfc2898DeriveBytes.cs: Fixed endian bug in F (thanks to Roei Erez)
and reduced the number of memory allocations.
svn path=/trunk/mcs/; revision=74843
* CryptoStream.cs: Rework Write to buffer the last block correctly.
The new code also reduce memory allocations. Fix for #81008.
svn path=/trunk/mcs/; revision=73712
* HMAC.cs: Handle BlockSizeValue correctly.
* HMACSHA384.cs: Add support for forthcoming ProduceLegacyHmacValues
property (in the next service pack).
* HMACSHA512.cs: Add support for forthcoming ProduceLegacyHmacValues
property (in the next service pack).
svn path=/trunk/mcs/; revision=72894
* CryptoConfig.cs: Add support for (2.0) X.509 extensions in
CreateFromName method. This allows the framework to be extensible with
new certificate extensions (syntax is missing from machine.config).
svn path=/trunk/mcs/; revision=67524
* CryptoConfig.cs: Use SmallXmlParser with a custom handler to reduce
memory requirements to process machine.config. Fix#79653 (beagle).
svn path=/trunk/mcs/; revision=66639
* CryptoConfig.cs: Accept lower/mixed-case algorithm names in
CreateFromName and MapNameToOID methods (fix bug #79641). Removed OID
mappings in 2.0 for DSA and 3DES (they were part of the betas but not
in the final 2.0 release of the framework).
svn path=/trunk/mcs/; revision=66547
* RSAOAEPKeyExchangeDeformatter.cs: Throw a CryptographicException,
instead of returning null, when a padding error occurs on decryption.
* RSAPKCS1KeyExchangeDeformatter.cs: Throw a CryptographicException,
instead of returning null, when a padding error occurs on decryption.
svn path=/trunk/mcs/; revision=65098
* AsymmetricSignatureDeformatter.cs: Set the hash algorithm name from
the hash instance. Fix for bug #78744 by Diego Mesa Tabares.
svn path=/trunk/mcs/; revision=62172
* 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
* 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
* DSAManaged.cs: Don't output J in the XML if it's not exported (i.e.
if it wasn't imported too but instead calculated from the other
parameters ;-).
svn path=/trunk/mcs/; revision=53356
* DESCryptoServiceProvider.cs: Don't change the instance key/iv when
creating an encryptor or decryptor specifying them. Generate a new key
if null is specified (not really useful but compatible with MS
behaviour). Check for weak/semi-weak key when creating transforms.
* RC2CryptoServiceProvider.cs: Don't change the instance key/iv when
creating an encryptor or decryptor specifying them. Check legal key
sizes when creating transforms.
* RijndaelManaged.cs: Don't change the instance key/iv when creating
an encryptor or decryptor specifying them. Check legal key sizes when
creating transforms.
* TripleDESCryptoServiceProvider.cs: Don't change the instance key/iv
when creating an encryptor or decryptor specifying them. Generate a
new key if null is specified (not really useful but compatible with MS
behaviour). Check for weak key when creating transforms.
svn path=/trunk/mcs/; revision=52043
* HMACSHA1.cs: Added the new 2.0 ctor that let the programmer choose
between the managed and unmanaged SHA1 algorithm used in the HMAC
(that doesn't change much thing in the default config for Mono).
* PasswordDeriveBytes.cs: Added [Obsolete] on GetBytes (2.0) as new
applications should be using Rfc2898DeriveBytes to get PKCS#5 v2
support.
svn path=/trunk/mcs/; revision=51010
* FromBase64Transform.cs: Check that the TransformFinal can be called
with only whitespace (with FromBase64TransformMode.IgnoreWhiteSpaces)
so that we must return new byte [0].
svn path=/trunk/mcs/; revision=48473
* FromBase64Transform.cs: Removed memory allocations during the
transform. It's now just the accumulator (ctor) and the
TransformFinalBlock that allocates memory. The transform is now
between 3 to 4 times faster than before.
svn path=/trunk/mcs/; revision=45947
* CryptoConfig.cs: Initialization wasn't threadsafe as the "checked"
value was assigned at the start of the initialization.
svn path=/trunk/mcs/; revision=44560
Fix line endings of System/Decimal.cs (only actual "change" in text, to force recompile of mscorlib to reflect changes in decimal constant handling in the compiler)
svn path=/trunk/mcs/; revision=44558
* CryptoConfig.cs: Removed RSA OID and added null check in EncodeOID
in NET_2_0 to match beta2.
* DES.cs: Added null check for IsWeakKey and IsSemiWeakKey in NET_2_0
to match beta2.
* SymmetricAlgorithm.cs: Throw CryptographicException when feedback is
zero in NET_2_0 to match beta2
* TripleDES.cs: Added null check for IsWeakKey in NET_2_0 to match
beta2.
svn path=/trunk/mcs/; revision=43554
* CryptoConfig.cs: Added Assert for FileIOPermission to LoadConfig so
the configuration can be read under partial trust.
svn path=/trunk/mcs/; revision=42585
* CryptoConfig.cs: Added LinkDemand for unrestricted to CreateFromName
when used to create instance with object[] parameters.
* CryptoAPITransform.cs: Added Demand for UnmanagedCode to KeyHandle
property.
svn path=/trunk/mcs/; revision=42205
* MD5CryptoServiceProvider.cs: Fixed#73404 to return right results
if the data length is bigger than 2^32 bits.
* SHA1CryptoServiceProvider.cs: Fixed#73404 to return right results
if the data length is bigger than 2^32 bits.
* SHA256Managed.cs: Fixed#73404 to return right results if the data
length is bigger than 2^32 bits.
svn path=/trunk/mcs/; revision=41524
* RNGCryptoServiceProvider.cs: Added a new call in the static ctor
to check if we're using a global handle. In that case we lock before
calling the RNG.
svn path=/trunk/mcs/; revision=41403