summaryrefslogtreecommitdiff
path: root/authAlgo.h
diff options
context:
space:
mode:
authorErwin Nindl <nine@wirdorange.org>2007-12-24 17:05:26 +0000
committerErwin Nindl <nine@wirdorange.org>2007-12-24 17:05:26 +0000
commit00febb25de92b1cd01309cc0f253ed4c3a761b13 (patch)
treeba0ffffdaf897e96ec2237a03cc523a4025b52f5 /authAlgo.h
parentmesh syncing works now (diff)
weihnachtlicher checkin
* packet processing now with less memory operations than before * todo: * testing * set cipher / authalgo via commandline * set key operations for hmac calculation
Diffstat (limited to 'authAlgo.h')
-rw-r--r--authAlgo.h11
1 files changed, 9 insertions, 2 deletions
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;