~zooko/cryptopp/trunk

« back to all changes in this revision

Viewing changes to square.cpp

  • Committer: weidai
  • Date: 2007-05-04 15:04:58 UTC
  • Revision ID: svn-v4:57ff6487-cd31-0410-9ec3-f628ee90f5f0:trunk/c5:328
reduce risk of random number reuse after VM rollback

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
        }
32
32
}
33
33
 
34
 
void Square::Base::UncheckedSetKey(CipherDir dir, const byte *userKey, unsigned int length)
 
34
void Square::Base::UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs &)
35
35
{
36
36
        AssertValidKeyLength(length);
37
37
 
52
52
        }  
53
53
 
54
54
        /* produce the round keys */
55
 
        if (dir == ENCRYPTION)
 
55
        if (IsForwardTransformation())
56
56
        {
57
57
                for (int i = 0; i < ROUNDS; i++)
58
58
                        SquareTransform (roundkeys[i], roundkeys[i]);