diff options
author | lloyd <[email protected]> | 2008-09-28 18:19:22 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-28 18:19:22 +0000 |
commit | 9caed38cf07ae1cb6fcb4e21c600818a48bf313e (patch) | |
tree | 388d4c2ed79f8dc5580c41f4e474ee7517121a25 /include | |
parent | 983a8ecb42e844f89466d0ae52bba591d4fc4275 (diff) |
Modularize CMAC and HMAC
Diffstat (limited to 'include')
-rw-r--r-- | include/cmac.h | 41 | ||||
-rw-r--r-- | include/hmac.h | 34 |
2 files changed, 0 insertions, 75 deletions
diff --git a/include/cmac.h b/include/cmac.h deleted file mode 100644 index c7f107258..000000000 --- a/include/cmac.h +++ /dev/null @@ -1,41 +0,0 @@ -/************************************************* -* CMAC Header File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ - -#ifndef BOTAN_CMAC_H__ -#define BOTAN_CMAC_H__ - -#include <botan/base.h> - -namespace Botan { - -/************************************************* -* CMAC * -*************************************************/ -class BOTAN_DLL CMAC : public MessageAuthenticationCode - { - public: - void clear() throw(); - std::string name() const; - MessageAuthenticationCode* clone() const; - - static SecureVector<byte> poly_double(const MemoryRegion<byte>& in, - byte polynomial); - - CMAC(const std::string&); - ~CMAC() { delete e; } - private: - void add_data(const byte[], u32bit); - void final_result(byte[]); - void key(const byte[], u32bit); - - BlockCipher* e; - SecureVector<byte> buffer, state, B, P; - u32bit position; - byte polynomial; - }; - -} - -#endif diff --git a/include/hmac.h b/include/hmac.h deleted file mode 100644 index 62529cf13..000000000 --- a/include/hmac.h +++ /dev/null @@ -1,34 +0,0 @@ -/************************************************* -* HMAC Header File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ - -#ifndef BOTAN_HMAC_H__ -#define BOTAN_HMAC_H__ - -#include <botan/base.h> - -namespace Botan { - -/************************************************* -* HMAC * -*************************************************/ -class BOTAN_DLL HMAC : public MessageAuthenticationCode - { - public: - void clear() throw(); - std::string name() const; - MessageAuthenticationCode* clone() const; - HMAC(const std::string&); - ~HMAC() { delete hash; } - private: - void add_data(const byte[], u32bit); - void final_result(byte[]); - void key(const byte[], u32bit); - HashFunction* hash; - SecureVector<byte> i_key, o_key; - }; - -} - -#endif |