From 6d9ad105f26ce29b15a3d2a1dc8d3f842bc281b0 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 22 Jun 2010 13:54:18 +0000 Subject: Only call the scalar versions if we actually have leftover blocks to process --- src/block/noekeon_simd/noekeon_simd.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/block/noekeon_simd/noekeon_simd.cpp') diff --git a/src/block/noekeon_simd/noekeon_simd.cpp b/src/block/noekeon_simd/noekeon_simd.cpp index c36f269a4..be7ca86da 100644 --- a/src/block/noekeon_simd/noekeon_simd.cpp +++ b/src/block/noekeon_simd/noekeon_simd.cpp @@ -103,7 +103,8 @@ void Noekeon_SIMD::encrypt_n(const byte in[], byte out[], u32bit blocks) const blocks -= 4; } - Noekeon::encrypt_n(in, out, blocks); + if(blocks) + Noekeon::encrypt_n(in, out, blocks); } /* @@ -159,7 +160,8 @@ void Noekeon_SIMD::decrypt_n(const byte in[], byte out[], u32bit blocks) const blocks -= 4; } - Noekeon::decrypt_n(in, out, blocks); + if(blocks) + Noekeon::decrypt_n(in, out, blocks); } } -- cgit v1.2.3