aboutsummaryrefslogtreecommitdiffstats
path: root/src/aead/gcm
diff options
context:
space:
mode:
authorlloyd <[email protected]>2013-04-03 20:15:58 +0000
committerlloyd <[email protected]>2013-04-03 20:15:58 +0000
commit6f4719d43374213a5057ea8689b4c95b5c6ad4ca (patch)
treed75fb5a551983ff14639a6f2868f432cb35a91f3 /src/aead/gcm
parent72e28626c40de83eb37856e252bea647ed523ec4 (diff)
Remove return value of AEAD_Mode::start as it doesn't seem necessary
and is an extra complication for callers. Replace the get_aead in lookup.h returning a Filter with one in aead.h returning AEAD_Mode.
Diffstat (limited to 'src/aead/gcm')
-rw-r--r--src/aead/gcm/gcm.cpp4
-rw-r--r--src/aead/gcm/gcm.h2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/aead/gcm/gcm.cpp b/src/aead/gcm/gcm.cpp
index 665fc4472..fbef36fee 100644
--- a/src/aead/gcm/gcm.cpp
+++ b/src/aead/gcm/gcm.cpp
@@ -153,7 +153,7 @@ void GCM_Mode::set_associated_data(const byte ad[], size_t ad_len)
m_ad_len = ad_len;
}
-secure_vector<byte> GCM_Mode::start(const byte nonce[], size_t nonce_len)
+void GCM_Mode::start(const byte nonce[], size_t nonce_len)
{
if(!valid_nonce_length(nonce_len))
throw Invalid_IV_Length(name(), nonce_len);
@@ -178,8 +178,6 @@ secure_vector<byte> GCM_Mode::start(const byte nonce[], size_t nonce_len)
m_text_len = 0;
m_mac = m_H_ad;
-
- return secure_vector<byte>();
}
void GCM_Encryption::update(secure_vector<byte>& buffer, size_t offset)
diff --git a/src/aead/gcm/gcm.h b/src/aead/gcm/gcm.h
index bc7eaae20..10a4a3497 100644
--- a/src/aead/gcm/gcm.h
+++ b/src/aead/gcm/gcm.h
@@ -21,7 +21,7 @@ namespace Botan {
class BOTAN_DLL GCM_Mode : public AEAD_Mode
{
public:
- secure_vector<byte> start(const byte nonce[], size_t nonce_len) override;
+ void start(const byte nonce[], size_t nonce_len) override;
void set_associated_data(const byte ad[], size_t ad_len) override;