From 04bf8dc51861bab37d6260de8b318dc71ea4bba7 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Thu, 15 Sep 2016 09:16:46 -0400 Subject: Add T::provider() to allow user to inquire about implementation used For block ciphers, stream ciphers, hashes, MACs, and cipher modes. Cipher_Mode already had it, with a slightly different usage. --- src/lib/block/idea/idea.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/lib/block/idea/idea.cpp') diff --git a/src/lib/block/idea/idea.cpp b/src/lib/block/idea/idea.cpp index db55c5c26..8616b7765 100644 --- a/src/lib/block/idea/idea.cpp +++ b/src/lib/block/idea/idea.cpp @@ -109,6 +109,18 @@ void idea_op(const byte in[], byte out[], size_t blocks, const u16bit K[52]) } +const char* IDEA::provider() const + { +#if defined(BOTAN_HAS_IDEA_SSE2) + if(CPUID::has_sse2()) + { + return "sse2"; + } +#endif + + return "base"; + } + /* * IDEA Encryption */ -- cgit v1.2.3