summaryrefslogtreecommitdiff
path: root/authAlgo.h
diff options
context:
space:
mode:
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;