From 6894dca64c04936d07048c0e8cbf7e25858548c3 Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 10 Jan 2014 03:41:59 +0000 Subject: Move lib into src --- src/lib/mac/mac.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/lib/mac/mac.h (limited to 'src/lib/mac/mac.h') diff --git a/src/lib/mac/mac.h b/src/lib/mac/mac.h new file mode 100644 index 000000000..d42092908 --- /dev/null +++ b/src/lib/mac/mac.h @@ -0,0 +1,46 @@ +/* +* Base class for message authentiction codes +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ + +#ifndef BOTAN_MESSAGE_AUTH_CODE_BASE_H__ +#define BOTAN_MESSAGE_AUTH_CODE_BASE_H__ + +#include +#include +#include + +namespace Botan { + +/** +* This class represents Message Authentication Code (MAC) objects. +*/ +class BOTAN_DLL MessageAuthenticationCode : public Buffered_Computation, + public SymmetricAlgorithm + { + public: + /** + * Verify a MAC. + * @param in the MAC to verify as a byte array + * @param length the length of param in + * @return true if the MAC is valid, false otherwise + */ + virtual bool verify_mac(const byte in[], size_t length); + + /** + * Get a new object representing the same algorithm as *this + */ + virtual MessageAuthenticationCode* clone() const = 0; + + /** + * Get the name of this algorithm. + * @return name of this algorithm + */ + virtual std::string name() const = 0; + }; + +} + +#endif -- cgit v1.2.3