diff options
Diffstat (limited to 'src/aead/eax/eax.cpp')
-rw-r--r-- | src/aead/eax/eax.cpp | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/src/aead/eax/eax.cpp b/src/aead/eax/eax.cpp index d03d6ec5e..8a7287062 100644 --- a/src/aead/eax/eax.cpp +++ b/src/aead/eax/eax.cpp @@ -45,11 +45,30 @@ EAX_Mode::EAX_Mode(BlockCipher* cipher, size_t tag_size) : throw Invalid_Argument(name() + ": Bad tag size " + std::to_string(tag_size)); } +void EAX_Mode::clear() + { + m_cipher.reset(); + m_ctr.reset(); + m_cmac.reset(); + zeroise(m_ad_mac); + zeroise(m_nonce_mac); + } + +std::string EAX_Mode::name() const + { + return (m_cipher->name() + "/EAX"); + } + size_t EAX_Mode::update_granularity() const { return 8 * m_cipher->parallel_bytes(); } +Key_Length_Specification EAX_Mode::key_spec() const + { + return m_cipher->key_spec(); + } + /* * Set the EAX key */ @@ -86,14 +105,6 @@ secure_vector<byte> EAX_Mode::start(const byte nonce[], size_t nonce_len) return secure_vector<byte>(); } -/* -* Return the name of this cipher mode -*/ -std::string EAX_Mode::name() const - { - return (m_cipher->name() + "/EAX"); - } - void EAX_Encryption::update(secure_vector<byte>& buffer) { m_ctr->cipher(&buffer[0], &buffer[0], buffer.size()); |