aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-11-18 17:03:06 -0500
committerJack Lloyd <[email protected]>2017-11-18 17:03:06 -0500
commitf926f14095873df0a59aea5c398b7519a196b316 (patch)
tree0b33621493000bb52a74053e66ec17e4464eee82 /src/lib/modes
parentc8f026ef5958f2e4732c406f45b9d070e98be2c0 (diff)
Add a function for checking if poly_double_n supports a particular size
Diffstat (limited to 'src/lib/modes')
-rw-r--r--src/lib/modes/xts/xts.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/modes/xts/xts.cpp b/src/lib/modes/xts/xts.cpp
index 496b71c5f..0b10faa92 100644
--- a/src/lib/modes/xts/xts.cpp
+++ b/src/lib/modes/xts/xts.cpp
@@ -13,10 +13,7 @@ namespace Botan {
XTS_Mode::XTS_Mode(BlockCipher* cipher) : m_cipher(cipher)
{
- if(m_cipher->block_size() != 8 &&
- m_cipher->block_size() != 16 &&
- m_cipher->block_size() != 32 &&
- m_cipher->block_size() != 64)
+ if(poly_double_supported_size(m_cipher->block_size()) == false)
{
throw Invalid_Argument("Cannot use " + cipher->name() + " with XTS");
}