[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 CryptoAPITransform.cs,1.5,1.6 ECBDecrypt.cs,1.3,1.4 |
Date: |
Thu, 28 Nov 2002 19:33:40 -0500 |
Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Security/Cryptography
In directory subversions:/tmp/cvs-serv17779/runtime/System/Security/Cryptography
Modified Files:
CryptoAPITransform.cs ECBDecrypt.cs
Log Message:
Test cases and bug fixes for the cipher modes.
Index: CryptoAPITransform.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Security/Cryptography/CryptoAPITransform.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** CryptoAPITransform.cs 27 Nov 2002 22:27:06 -0000 1.5
--- CryptoAPITransform.cs 29 Nov 2002 00:33:37 -0000 1.6
***************
*** 251,261 ****
get
{
! if(mode == CipherMode.CFB || mode ==
CipherMode.OFB)
{
! return 1;
}
else
{
! return blockSize;
}
}
--- 251,261 ----
get
{
! if(mode == CipherMode.ECB || mode ==
CipherMode.CBC)
{
! return blockSize;
}
else
{
! return 1;
}
}
***************
*** 267,277 ****
get
{
! if(mode == CipherMode.CFB || mode ==
CipherMode.OFB)
{
! return 1;
}
else
{
! return blockSize;
}
}
--- 267,277 ----
get
{
! if(mode == CipherMode.ECB || mode ==
CipherMode.CBC)
{
! return blockSize;
}
else
{
! return 1;
}
}
Index: ECBDecrypt.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Security/Cryptography/ECBDecrypt.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** ECBDecrypt.cs 27 Nov 2002 22:27:06 -0000 1.3
--- ECBDecrypt.cs 29 Nov 2002 00:33:37 -0000 1.4
***************
*** 127,136 ****
{
// Use PKCS #7 padding.
! pad = tempBuffer[2 * blockSize
- 1];
if(pad == 0 || pad > blockSize)
{
pad = blockSize;
}
! Array.Copy(tempBuffer,
blockSize, outputBuffer,
offset,
blockSize - pad);
offset += blockSize - pad;
--- 127,136 ----
{
// Use PKCS #7 padding.
! pad = tempBuffer[blockSize - 1];
if(pad == 0 || pad > blockSize)
{
pad = blockSize;
}
! Array.Copy(tempBuffer, 0,
outputBuffer,
offset,
blockSize - pad);
offset += blockSize - pad;
***************
*** 141,150 ****
// Strip zeroes from the end of
the block.
index = blockSize;
! while(index > 0 &&
! tempBuffer[index - 1
+ blockSize] == 0)
{
--index;
}
! Array.Copy(tempBuffer,
blockSize, outputBuffer,
offset,
index);
offset += index;
--- 141,149 ----
// Strip zeroes from the end of
the block.
index = blockSize;
! while(index > 0 &&
tempBuffer[index - 1] == 0)
{
--index;
}
! Array.Copy(tempBuffer, 0,
outputBuffer,
offset,
index);
offset += index;
***************
*** 153,157 ****
{
// No padding, so return the
whole block.
! Array.Copy(tempBuffer,
blockSize, outputBuffer,
offset,
blockSize);
offset += blockSize;
--- 152,156 ----
{
// No padding, so return the
whole block.
! Array.Copy(tempBuffer, 0,
outputBuffer,
offset,
blockSize);
offset += blockSize;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Security/Cryptography CryptoAPITransform.cs,1.5,1.6 ECBDecrypt.cs,1.3,1.4,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.497,1.498
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/tests/runtime/System/Security/Cryptography CryptoTestCase.cs,1.7,1.8 TestAES.cs,1.2,1.3 TestDES.cs,1.3,1.4 TestRC2.cs,1.2,1.3 TestTripleDES.cs,1.3,1.4
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.497,1.498
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/tests/runtime/System/Security/Cryptography CryptoTestCase.cs,1.7,1.8 TestAES.cs,1.2,1.3 TestDES.cs,1.3,1.4 TestRC2.cs,1.2,1.3 TestTripleDES.cs,1.3,1.4
- Index(es):