~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to extra/yassl/taocrypt/src/twofish.cpp

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
   Copyright (C) 2000-2007 MySQL AB
 
2
   Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
3
3
 
4
4
   This program is free software; you can redistribute it and/or modify
5
5
   it under the terms of the GNU General Public License as published by
11
11
   GNU General Public License for more details.
12
12
 
13
13
   You should have received a copy of the GNU General Public License
14
 
   along with this program; see the file COPYING. If not, write to the
15
 
   Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
16
 
   MA  02110-1301  USA.
 
14
   along with this program; if not, write to the Free Software
 
15
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
17
16
*/
18
17
 
19
18
/* C++ based on Wei Dai's twofish.cpp from CryptoPP */
54
53
            out += BLOCK_SIZE;
55
54
            in  += BLOCK_SIZE;
56
55
        }
57
 
    else if (mode_ == CBC)
 
56
    else if (mode_ == CBC) {
58
57
        if (dir_ == ENCRYPTION)
59
58
            while (blocks--) {
60
59
                r_[0] ^= *(word32*)in;
82
81
                out += BLOCK_SIZE;
83
82
                in  += BLOCK_SIZE;
84
83
            }
 
84
    }
85
85
}
86
86
 
87
87
#endif // DO_TWOFISH_ASM