aboutsummaryrefslogtreecommitdiffstats
path: root/src/aead/ocb
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/ocb
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/ocb')
-rw-r--r--src/aead/ocb/ocb.cpp4
-rw-r--r--src/aead/ocb/ocb.h2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/aead/ocb/ocb.cpp b/src/aead/ocb/ocb.cpp
index 4cbd8bde8..20f54dca7 100644
--- a/src/aead/ocb/ocb.cpp
+++ b/src/aead/ocb/ocb.cpp
@@ -215,7 +215,7 @@ void OCB_Mode::set_associated_data(const byte ad[], size_t ad_len)
m_ad_hash = ocb_hash(*m_L, *m_cipher, &ad[0], ad_len);
}
-secure_vector<byte> OCB_Mode::start(const byte nonce[], size_t nonce_len)
+void OCB_Mode::start(const byte nonce[], size_t nonce_len)
{
if(!valid_nonce_length(nonce_len))
throw Invalid_IV_Length(name(), nonce_len);
@@ -225,8 +225,6 @@ secure_vector<byte> OCB_Mode::start(const byte nonce[], size_t nonce_len)
m_offset = m_nonce_state->update_nonce(nonce, nonce_len);
zeroise(m_checksum);
m_block_index = 0;
-
- return secure_vector<byte>();
}
void OCB_Encryption::encrypt(byte buffer[], size_t blocks)
diff --git a/src/aead/ocb/ocb.h b/src/aead/ocb/ocb.h
index d50710a79..597cd9c52 100644
--- a/src/aead/ocb/ocb.h
+++ b/src/aead/ocb/ocb.h
@@ -30,7 +30,7 @@ class Nonce_State;
class BOTAN_DLL OCB_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;