diff options
author | Jack Lloyd <[email protected]> | 2016-09-15 09:16:46 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-09-15 09:25:49 -0400 |
commit | 04bf8dc51861bab37d6260de8b318dc71ea4bba7 (patch) | |
tree | 03cf4b8d607607444049bc2b9880abc4c1fc6a8e /src/lib/modes/aead/gcm/gcm.cpp | |
parent | a7eba3629cc0d76444f5241fb4b9e8793ddb61cd (diff) |
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.
Diffstat (limited to 'src/lib/modes/aead/gcm/gcm.cpp')
-rw-r--r-- | src/lib/modes/aead/gcm/gcm.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/modes/aead/gcm/gcm.cpp b/src/lib/modes/aead/gcm/gcm.cpp index e23551cb4..590c0d0ce 100644 --- a/src/lib/modes/aead/gcm/gcm.cpp +++ b/src/lib/modes/aead/gcm/gcm.cpp @@ -185,6 +185,16 @@ std::string GCM_Mode::name() const return (m_cipher_name + "/GCM"); } +const char* GCM_Mode::provider() const + { +#if defined(BOTAN_HAS_GCM_CLMUL) + if(CPUID::has_clmul()) + return "clmul"; +#endif + + return "base"; + } + size_t GCM_Mode::update_granularity() const { return m_BS; |