aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/noekeon_simd
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-06-22 13:54:18 +0000
committerlloyd <[email protected]>2010-06-22 13:54:18 +0000
commit6d9ad105f26ce29b15a3d2a1dc8d3f842bc281b0 (patch)
tree89d656e974f4520c04b9f58039b4493bf6196a49 /src/block/noekeon_simd
parent238869aed29c3d703650ce55404929dc7e3f31fb (diff)
Only call the scalar versions if we actually have leftover blocks to
process
Diffstat (limited to 'src/block/noekeon_simd')
-rw-r--r--src/block/noekeon_simd/noekeon_simd.cpp6
1 files changed, 4 insertions, 2 deletions
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);
}
}