~ubuntu-branches/ubuntu/quantal/unrar-nonfree/quantal

« back to all changes in this revision

Viewing changes to rijndael.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Martin Meredith
  • Date: 2009-06-06 17:46:05 UTC
  • mto: (1.1.11 upstream) (5.1.5 sid)
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20090606174605-825ysfkrhw7wkc9e
ImportĀ upstreamĀ versionĀ 3.9.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
 
87
87
 
88
88
  
89
 
int Rijndael::blockDecrypt(const byte *input, int inputLen, byte *outBuffer)
 
89
size_t Rijndael::blockDecrypt(const byte *input, size_t inputLen, byte *outBuffer)
90
90
{
91
91
  if (input == 0 || inputLen <= 0)
92
92
    return 0;
94
94
  byte block[16], iv[4][4];
95
95
  memcpy(iv,m_initVector,16); 
96
96
 
97
 
  int numBlocks=inputLen/16;
98
 
  for (int i = numBlocks; i > 0; i--)
 
97
  size_t numBlocks=inputLen/16;
 
98
  for (size_t i = numBlocks; i > 0; i--)
99
99
  {
100
100
    decrypt(input, block);
101
101
    Xor128(block,block,(byte*)iv);