optimization in CBC_Decryption::ProcessBlocks()

This commit is contained in:
weidai 2006-07-17 14:51:20 +00:00
parent 1c25799598
commit f7f1e82b0c

View File

@ -192,8 +192,7 @@ void CBC_Decryption::ProcessBlocks(byte *outString, const byte *inString, size_t
while (numberOfBlocks--) while (numberOfBlocks--)
{ {
memcpy(m_temp, inString, blockSize); memcpy(m_temp, inString, blockSize);
m_cipher->ProcessBlock(m_temp, outString); m_cipher->ProcessAndXorBlock(m_temp, m_register, outString);
xorbuf(outString, m_register, blockSize);
m_register.swap(m_temp); m_register.swap(m_temp);
inString += blockSize; inString += blockSize;
outString += blockSize; outString += blockSize;