diff options
author | lloyd <[email protected]> | 2013-04-10 14:40:14 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2013-04-10 14:40:14 +0000 |
commit | 70c3f7edc155bdbc2630e0086536a1c90506b5b9 (patch) | |
tree | ca7d439d08eba7fb33d1f15658522fc1816799e9 /src/aead/ocb | |
parent | edc6851e89a33e0c2b2005fb5a079f9e91a5457e (diff) |
Revert part of 5be6e329324fc8263de56167091754e27305917b,
AEAD_Mode::start now returns a value again. While not useful for any
current modes it allows future flexibility of presenting
protoocol-level concepts (eg, OpenPGP encryption) using the AEAD
interface.
Diffstat (limited to 'src/aead/ocb')
-rw-r--r-- | src/aead/ocb/ocb.cpp | 4 | ||||
-rw-r--r-- | src/aead/ocb/ocb.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/aead/ocb/ocb.cpp b/src/aead/ocb/ocb.cpp index 20f54dca7..4cbd8bde8 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); } -void OCB_Mode::start(const byte nonce[], size_t nonce_len) +secure_vector<byte> OCB_Mode::start(const byte nonce[], size_t nonce_len) { if(!valid_nonce_length(nonce_len)) throw Invalid_IV_Length(name(), nonce_len); @@ -225,6 +225,8 @@ void 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 597cd9c52..d50710a79 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: - void start(const byte nonce[], size_t nonce_len) override; + secure_vector<byte> start(const byte nonce[], size_t nonce_len) override; void set_associated_data(const byte ad[], size_t ad_len) override; |