summaryrefslogtreecommitdiff
path: root/extra/yassl/taocrypt/include/modes.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'extra/yassl/taocrypt/include/modes.hpp')
-rw-r--r--extra/yassl/taocrypt/include/modes.hpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/extra/yassl/taocrypt/include/modes.hpp b/extra/yassl/taocrypt/include/modes.hpp
index 6c04c4e4457..5fd36b80d3e 100644
--- a/extra/yassl/taocrypt/include/modes.hpp
+++ b/extra/yassl/taocrypt/include/modes.hpp
@@ -12,8 +12,9 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ along with this program; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ MA 02110-1301 USA.
*/
/* modes.hpp provides ECB and CBC modes for block cipher encryption/decryption
@@ -60,9 +61,7 @@ public:
explicit Mode_BASE(int sz, CipherDir dir, Mode mode)
: blockSz_(sz), reg_(reinterpret_cast<byte*>(r_)),
tmp_(reinterpret_cast<byte*>(t_)), dir_(dir), mode_(mode)
- {
- assert(sz <= MaxBlockSz);
- }
+ {}
virtual ~Mode_BASE() {}
virtual void Process(byte*, const byte*, word32);
@@ -95,8 +94,7 @@ inline void Mode_BASE::Process(byte* out, const byte* in, word32 sz)
{
if (mode_ == ECB)
ECB_Process(out, in, sz);
- else if (mode_ == CBC)
- {
+ else if (mode_ == CBC) {
if (dir_ == ENCRYPTION)
CBC_Encrypt(out, in, sz);
else