[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Security/Cryptography
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Security/Cryptography DES.cs,1.1,1.2 ECBDecrypt.cs,1.1,1.2 SymmetricAlgorithm.cs,1.3,1.4 |
Date: |
Thu, 21 Nov 2002 19:17:51 -0500 |
Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Security/Cryptography
In directory subversions:/tmp/cvs-serv21403/runtime/System/Security/Cryptography
Modified Files:
DES.cs ECBDecrypt.cs SymmetricAlgorithm.cs
Log Message:
Test the behaviour of some of the cryptographic algorithms.
Index: DES.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Security/Cryptography/DES.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** DES.cs 6 Jul 2002 07:03:07 -0000 1.1
--- DES.cs 22 Nov 2002 00:17:48 -0000 1.2
***************
*** 95,99 ****
throw new
ArgumentNullException("value");
}
! else if(value.Length != KeySizeValue)
{
throw new ArgumentException
--- 95,99 ----
throw new
ArgumentNullException("value");
}
! else if((value.Length * 8) !=
KeySizeValue)
{
throw new ArgumentException
Index: ECBDecrypt.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Security/Cryptography/ECBDecrypt.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** ECBDecrypt.cs 18 Jul 2002 00:30:33 -0000 1.1
--- ECBDecrypt.cs 22 Nov 2002 00:17:48 -0000 1.2
***************
*** 163,167 ****
{
byte[] newout = new byte [offset];
! Array.Copy(outputBuffer, 0, newout, 0,
offset);
outputBuffer.Initialize();
outputBuffer = newout;
--- 163,170 ----
{
byte[] newout = new byte [offset];
! if(offset != 0)
! {
! Array.Copy(outputBuffer, 0,
newout, 0, offset);
! }
outputBuffer.Initialize();
outputBuffer = newout;
Index: SymmetricAlgorithm.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Security/Cryptography/SymmetricAlgorithm.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** SymmetricAlgorithm.cs 18 Jul 2002 00:30:33 -0000 1.3
--- SymmetricAlgorithm.cs 22 Nov 2002 00:17:48 -0000 1.4
***************
*** 161,171 ****
throw new
ArgumentNullException("value");
}
! else if(value.Length != KeySizeValue)
! {
! throw new CryptographicException
!
(_("Crypto_InvalidKeySize"),
!
value.Length.ToString());
! }
KeyValue = value;
}
}
--- 161,168 ----
throw new
ArgumentNullException("value");
}
! KeySizes.Validate(LegalKeySizesValue,
value.Length * 8,
!
"Crypto_InvalidKeySize");
KeyValue = value;
+ KeySizeValue = value.Length * 8;
}
}
***************
*** 278,287 ****
throw new
ArgumentNullException("rgbKey");
}
! KeySizes.Validate(LegalKeySizesValue,
rgbKey.Length,
"Crypto_InvalidKeySize");
if(rgbIV != null)
{
// Verify the size of the IV against
the block size.
! if(rgbIV.Length != BlockSizeValue)
{
throw new CryptographicException
--- 275,284 ----
throw new
ArgumentNullException("rgbKey");
}
! KeySizes.Validate(LegalKeySizesValue,
rgbKey.Length * 8,
"Crypto_InvalidKeySize");
if(rgbIV != null)
{
// Verify the size of the IV against
the block size.
! if((rgbIV.Length * 8) != BlockSizeValue)
{
throw new CryptographicException
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Security/Cryptography DES.cs,1.1,1.2 ECBDecrypt.cs,1.1,1.2 SymmetricAlgorithm.cs,1.3,1.4,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/tests/runtime Testruntime.cs,1.3,1.4
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/tests/runtime/System/Security/Cryptography CryptoTestCase.cs,NONE,1.1 Makefile,NONE,1.1 TestAES.cs,NONE,1.1 TestCryptography.cs,NONE,1.1 TestDES.cs,NONE,1.1 TestMD5.cs,NONE,1.1 TestRC2.cs,NONE,1.1 TestSHA1.cs,NONE,1.1 TestSHA256.cs,NONE,1.1 TestSHA384.cs,NONE,1.1 TestSHA512.cs,NONE,1.1 TestTripleDES.cs,NONE,1.1
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/tests/runtime Testruntime.cs,1.3,1.4
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/tests/runtime/System/Security/Cryptography CryptoTestCase.cs,NONE,1.1 Makefile,NONE,1.1 TestAES.cs,NONE,1.1 TestCryptography.cs,NONE,1.1 TestDES.cs,NONE,1.1 TestMD5.cs,NONE,1.1 TestRC2.cs,NONE,1.1 TestSHA1.cs,NONE,1.1 TestSHA256.cs,NONE,1.1 TestSHA384.cs,NONE,1.1 TestSHA512.cs,NONE,1.1 TestTripleDES.cs,NONE,1.1
- Index(es):