aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/mac/mac.h
diff options
context:
space:
mode:
authorMatthias Gierlings <[email protected]>2016-02-03 22:38:41 +0100
committerMatthias Gierlings <[email protected]>2016-10-27 19:42:32 +0200
commit425a2c2497387b7b5804738a77c757b93e630322 (patch)
treedfe9d327cfcf1bfe3a628b8f007200ff18083daf /src/lib/mac/mac.h
parent1b9d13aed71152d61fab7e0ba016d1951909bac5 (diff)
Added implementation for GMAC
- Added GMAC class - Integrated GMAC into MAC-Class test bench. Run GMAC tests using ./botan-test mac
Diffstat (limited to 'src/lib/mac/mac.h')
-rw-r--r--src/lib/mac/mac.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/lib/mac/mac.h b/src/lib/mac/mac.h
index f3befc512..9c3614f33 100644
--- a/src/lib/mac/mac.h
+++ b/src/lib/mac/mac.h
@@ -59,7 +59,27 @@ class BOTAN_DLL MessageAuthenticationCode : public Buffered_Computation,
virtual bool verify_mac(const byte in[], size_t length);
/**
- * @return a new object representing the same algorithm as *this
+ * Verify a MAC.
+ * @param in the MAC to verify as a byte array
+ * @return true if the MAC is valid, false otherwise
+ */
+ virtual bool verify_mac(const std::vector<byte>& in)
+ {
+ return verify_mac(in.data(), in.size());
+ }
+
+ /**
+ * Verify a MAC.
+ * @param in the MAC to verify as a byte array
+ * @return true if the MAC is valid, false otherwise
+ */
+ virtual bool verify_mac(const secure_vector<byte>& in)
+ {
+ return verify_mac(in.data(), in.size());
+ }
+
+ /**
+ * Get a new object representing the same algorithm as *this
*/
virtual MessageAuthenticationCode* clone() const = 0;