From 9caed38cf07ae1cb6fcb4e21c600818a48bf313e Mon Sep 17 00:00:00 2001 From: lloyd Date: Sun, 28 Sep 2008 18:19:22 +0000 Subject: Modularize CMAC and HMAC --- include/cmac.h | 41 ----------------------------------------- include/hmac.h | 34 ---------------------------------- 2 files changed, 75 deletions(-) delete mode 100644 include/cmac.h delete mode 100644 include/hmac.h (limited to 'include') 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 - -namespace Botan { - -/************************************************* -* CMAC * -*************************************************/ -class BOTAN_DLL CMAC : public MessageAuthenticationCode - { - public: - void clear() throw(); - std::string name() const; - MessageAuthenticationCode* clone() const; - - static SecureVector poly_double(const MemoryRegion& 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 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 - -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 i_key, o_key; - }; - -} - -#endif -- cgit v1.2.3