diff options
author | lloyd <[email protected]> | 2015-01-11 04:15:03 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2015-01-11 04:15:03 +0000 |
commit | b07e980986bd62ecaa951140dbe2c472bbd60d3b (patch) | |
tree | bb39a25c5e79448ac1886407561e8c31980501c2 /src/lib/engine/core_engine | |
parent | 582e1cea2cb13c5d9d40610ff4566921f934ba27 (diff) |
Add SipHash
Diffstat (limited to 'src/lib/engine/core_engine')
-rw-r--r-- | src/lib/engine/core_engine/lookup_mac.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/engine/core_engine/lookup_mac.cpp b/src/lib/engine/core_engine/lookup_mac.cpp index ba5cd69c6..d5e16cf44 100644 --- a/src/lib/engine/core_engine/lookup_mac.cpp +++ b/src/lib/engine/core_engine/lookup_mac.cpp @@ -25,6 +25,10 @@ #include <botan/poly1305.h> #endif +#if defined(BOTAN_HAS_SIPHASH) + #include <botan/siphash.h> +#endif + #if defined(BOTAN_HAS_ANSI_X919_MAC) #include <botan/x919_mac.h> #endif @@ -53,6 +57,12 @@ Core_Engine::find_mac(const SCAN_Name& request, return new Poly1305; #endif +#if defined(BOTAN_HAS_SIPHASH) + if(request.algo_name() == "SipHash") + return new SipHash(request.arg_as_integer(0, 2), + request.arg_as_integer(1, 4)); +#endif + #if defined(BOTAN_HAS_CBC_MAC) if(request.algo_name() == "CBC-MAC" && request.arg_count() == 1) return new CBC_MAC(af.make_block_cipher(request.arg(0))); |