From 89f9ff94bf8f8d3f0acd5c0e28a5bb40e6e57cf8 Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 20 Mar 2013 02:32:07 +0000 Subject: Rename AEAD_Mode to AEAD_Filter --- src/filters/aead/aead.h | 38 -------------------------------------- src/filters/aead/aead_filt.h | 38 ++++++++++++++++++++++++++++++++++++++ src/filters/aead/eax/eax.h | 4 ++-- src/filters/aead/gcm/gcm.h | 4 ++-- src/filters/aead/ocb/ocb.h | 4 ++-- 5 files changed, 44 insertions(+), 44 deletions(-) delete mode 100644 src/filters/aead/aead.h create mode 100644 src/filters/aead/aead_filt.h diff --git a/src/filters/aead/aead.h b/src/filters/aead/aead.h deleted file mode 100644 index aa080452b..000000000 --- a/src/filters/aead/aead.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -* Interface for AEAD modes -* (C) 2013 Jack Lloyd -* -* Distributed under the terms of the Botan license -*/ - -#ifndef BOTAN_AEAD_H__ -#define BOTAN_AEAD_H__ - -#include - -namespace Botan { - -class BOTAN_DLL AEAD_Mode : public Keyed_Filter - { - public: - /** - * Set associated data that is not included in the ciphertext but - * that should be authenticated. Must be called after set_key - * and before end_msg. - * - * @param ad the associated data - * @param ad_len length of add in bytes - */ - virtual void set_associated_data(const byte ad[], size_t ad_len) = 0; - - virtual void set_nonce(const byte nonce[], size_t nonce_len) = 0; - - void set_iv(const InitializationVector& iv) override - { - set_nonce(iv.begin(), iv.length()); - } - }; - -} - -#endif diff --git a/src/filters/aead/aead_filt.h b/src/filters/aead/aead_filt.h new file mode 100644 index 000000000..77818c17e --- /dev/null +++ b/src/filters/aead/aead_filt.h @@ -0,0 +1,38 @@ +/* +* Interface for AEAD modes +* (C) 2013 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ + +#ifndef BOTAN_AEAD_H__ +#define BOTAN_AEAD_H__ + +#include + +namespace Botan { + +class BOTAN_DLL AEAD_Filter : public Keyed_Filter + { + public: + /** + * Set associated data that is not included in the ciphertext but + * that should be authenticated. Must be called after set_key + * and before end_msg. + * + * @param ad the associated data + * @param ad_len length of add in bytes + */ + virtual void set_associated_data(const byte ad[], size_t ad_len) = 0; + + virtual void set_nonce(const byte nonce[], size_t nonce_len) = 0; + + void set_iv(const InitializationVector& iv) override + { + set_nonce(iv.begin(), iv.length()); + } + }; + +} + +#endif diff --git a/src/filters/aead/eax/eax.h b/src/filters/aead/eax/eax.h index a85377524..cf99622a1 100644 --- a/src/filters/aead/eax/eax.h +++ b/src/filters/aead/eax/eax.h @@ -8,7 +8,7 @@ #ifndef BOTAN_EAX_H__ #define BOTAN_EAX_H__ -#include +#include #include #include #include @@ -20,7 +20,7 @@ namespace Botan { /** * EAX Mode */ -class BOTAN_DLL EAX_Mode : public AEAD_Mode, +class BOTAN_DLL EAX_Mode : public AEAD_Filter, private Buffered_Filter { public: diff --git a/src/filters/aead/gcm/gcm.h b/src/filters/aead/gcm/gcm.h index 067b19298..a04a6b8c0 100644 --- a/src/filters/aead/gcm/gcm.h +++ b/src/filters/aead/gcm/gcm.h @@ -8,7 +8,7 @@ #ifndef BOTAN_GCM_H__ #define BOTAN_GCM_H__ -#include +#include #include #include #include @@ -19,7 +19,7 @@ namespace Botan { /** * GCM Mode */ -class BOTAN_DLL GCM_Mode : public AEAD_Mode, +class BOTAN_DLL GCM_Mode : public AEAD_Filter, private Buffered_Filter { public: diff --git a/src/filters/aead/ocb/ocb.h b/src/filters/aead/ocb/ocb.h index f5209df12..0a1cbcaff 100644 --- a/src/filters/aead/ocb/ocb.h +++ b/src/filters/aead/ocb/ocb.h @@ -8,7 +8,7 @@ #ifndef BOTAN_OCB_H__ #define BOTAN_OCB_H__ -#include +#include #include #include #include @@ -27,7 +27,7 @@ class Nonce_State; * @see Free Licenses http://www.cs.ucdavis.edu/~rogaway/ocb/license.htm * @see OCB home page http://www.cs.ucdavis.edu/~rogaway/ocb */ -class BOTAN_DLL OCB_Mode : public AEAD_Mode, +class BOTAN_DLL OCB_Mode : public AEAD_Filter, private Buffered_Filter { public: -- cgit v1.2.3