aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-09-15 21:08:51 -0400
committerJack Lloyd <[email protected]>2016-09-15 21:08:51 -0400
commit45a8210d63c2fc0b0ab0411dba55c903da226123 (patch)
tree9bc380f1134738f624700645f8a9692c363dc7bc /src/lib/modes
parent04bf8dc51861bab37d6260de8b318dc71ea4bba7 (diff)
Change T::provider to return std::string
Diffstat (limited to 'src/lib/modes')
-rw-r--r--src/lib/modes/aead/gcm/gcm.cpp2
-rw-r--r--src/lib/modes/aead/gcm/gcm.h2
-rw-r--r--src/lib/modes/cipher_mode.h3
3 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/modes/aead/gcm/gcm.cpp b/src/lib/modes/aead/gcm/gcm.cpp
index 590c0d0ce..e4a07af82 100644
--- a/src/lib/modes/aead/gcm/gcm.cpp
+++ b/src/lib/modes/aead/gcm/gcm.cpp
@@ -185,7 +185,7 @@ std::string GCM_Mode::name() const
return (m_cipher_name + "/GCM");
}
-const char* GCM_Mode::provider() const
+std::string GCM_Mode::provider() const
{
#if defined(BOTAN_HAS_GCM_CLMUL)
if(CPUID::has_clmul())
diff --git a/src/lib/modes/aead/gcm/gcm.h b/src/lib/modes/aead/gcm/gcm.h
index f0176f36a..3c8bdea3f 100644
--- a/src/lib/modes/aead/gcm/gcm.h
+++ b/src/lib/modes/aead/gcm/gcm.h
@@ -37,7 +37,7 @@ class BOTAN_DLL GCM_Mode : public AEAD_Mode
void clear() override;
- const char* provider() const override;
+ std::string provider() const override;
protected:
GCM_Mode(BlockCipher* cipher, size_t tag_size);
diff --git a/src/lib/modes/cipher_mode.h b/src/lib/modes/cipher_mode.h
index fa4c0aa8d..e98f014b7 100644
--- a/src/lib/modes/cipher_mode.h
+++ b/src/lib/modes/cipher_mode.h
@@ -169,9 +169,8 @@ class BOTAN_DLL Cipher_Mode
/**
* @return provider information about this implementation. Default is "base",
* might also return "sse2", "avx2", "openssl", or some other arbitrary string.
- * The return value is guaranteed to point to a string literal constant.
*/
- virtual const char* provider() const { return "base"; }
+ virtual std::string provider() const { return "base"; }
private:
virtual void key_schedule(const byte key[], size_t length) = 0;