diff options
author | Jack Lloyd <[email protected]> | 2017-09-22 18:22:35 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-09-22 18:22:35 -0400 |
commit | 00bf32562653b468b1b7a2b3ed3eb10f95bf230e (patch) | |
tree | b5fe552a453c04b8b357b3f4f459c02768d78349 /src | |
parent | 68c9859f968934089bc696a458e9983efac7d92e (diff) |
Avoid including HMAC directly
Doing it this way allows using OpenSSL etc
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/misc/fpe_fe1/fpe_fe1.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/misc/fpe_fe1/fpe_fe1.cpp b/src/lib/misc/fpe_fe1/fpe_fe1.cpp index 41a0cc606..04503125c 100644 --- a/src/lib/misc/fpe_fe1/fpe_fe1.cpp +++ b/src/lib/misc/fpe_fe1/fpe_fe1.cpp @@ -7,8 +7,7 @@ #include <botan/fpe_fe1.h> #include <botan/numthry.h> -#include <botan/hmac.h> -#include <botan/sha2_32.h> +#include <botan/mac.h> namespace Botan { @@ -93,7 +92,7 @@ FPE_Encryptor::FPE_Encryptor(const SymmetricKey& key, const BigInt& n, const std::vector<uint8_t>& tweak) { - m_mac.reset(new HMAC(new SHA_256)); + m_mac = MessageAuthenticationCode::create_or_throw("HMAC(SHA-256)"); m_mac->set_key(key); std::vector<uint8_t> n_bin = BigInt::encode(n); |