diff options
author | Jack Lloyd <[email protected]> | 2017-11-18 17:03:06 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-11-18 17:03:06 -0500 |
commit | f926f14095873df0a59aea5c398b7519a196b316 (patch) | |
tree | 0b33621493000bb52a74053e66ec17e4464eee82 /src/lib/mac | |
parent | c8f026ef5958f2e4732c406f45b9d070e98be2c0 (diff) |
Add a function for checking if poly_double_n supports a particular size
Diffstat (limited to 'src/lib/mac')
-rw-r--r-- | src/lib/mac/cmac/cmac.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/mac/cmac/cmac.cpp b/src/lib/mac/cmac/cmac.cpp index 18f7c151c..bd2a53a72 100644 --- a/src/lib/mac/cmac/cmac.cpp +++ b/src/lib/mac/cmac/cmac.cpp @@ -121,8 +121,7 @@ CMAC::CMAC(BlockCipher* cipher) : m_cipher(cipher), m_block_size(m_cipher->block_size()) { - if(m_block_size != 8 && m_block_size != 16 && - m_block_size != 32 && m_block_size != 64) + if(poly_double_supported_size(m_block_size) == false) { throw Invalid_Argument("CMAC cannot use the " + std::to_string(m_block_size * 8) + |