From 00febb25de92b1cd01309cc0f253ed4c3a761b13 Mon Sep 17 00:00:00 2001 From: Erwin Nindl Date: Mon, 24 Dec 2007 17:05:26 +0000 Subject: weihnachtlicher checkin * packet processing now with less memory operations than before * todo: * testing * set cipher / authalgo via commandline * set key operations for hmac calculation --- authAlgo.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'authAlgo.h') diff --git a/authAlgo.h b/authAlgo.h index de813e6..4c9c960 100644 --- a/authAlgo.h +++ b/authAlgo.h @@ -44,7 +44,7 @@ public: AuthAlgo() {}; virtual ~AuthAlgo() {}; - virtual AuthTag calc(const Buffer& buf) = 0; + virtual AuthTag calc(const Buffer& buf) { return AuthTag(0); }; }; class NullAuthAlgo : public AuthAlgo @@ -65,9 +65,16 @@ public: ~Sha1AuthAlgo(); /** - * + * set the key for the auth algo + * @param key key for hmac sha1 calculation */ void setKey(Buffer key); + + /** + * calculate the sha1 hmac + * @param buf buffer for message digest + * @return sha1 hmac + */ AuthTag calc(const Buffer& buf); protected: static const char* MIN_GCRYPT_VERSION; -- cgit v1.2.3