summaryrefslogtreecommitdiff
path: root/authAlgo.h
diff options
context:
space:
mode:
authorErwin Nindl <nine@wirdorange.org>2007-12-12 16:10:58 +0000
committerErwin Nindl <nine@wirdorange.org>2007-12-12 16:10:58 +0000
commit974d6973f4479c0f5bacc0a5ce07a5cfc62bb01c (patch)
treed537dabd53431fd071e24812982964ebdae2f2f7 /authAlgo.h
parentadded newline (diff)
* renamed HmacAuthAlgo to Sha1AuthAlgo
* removed a memleak at the IV generation in kd, cypher
Diffstat (limited to 'authAlgo.h')
-rw-r--r--authAlgo.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/authAlgo.h b/authAlgo.h
index e3de813..1a6d431 100644
--- a/authAlgo.h
+++ b/authAlgo.h
@@ -31,8 +31,11 @@
#ifndef _AUTHALGO_H_
#define _AUTHALGO_H_
-#include "datatypes.h"
#include "authTag.h"
+#include "datatypes.h"
+#include "buffer.h"
+
+#include <gcrypt.h>
class AuthAlgo
{
@@ -51,10 +54,16 @@ public:
// HMAC_SHA1
-class HmacAuthAlgo : public AuthAlgo
+class Sha1AuthAlgo : public AuthAlgo
{
public:
+ Sha1AuthAlgo();
+ ~Sha1AuthAlgo();
+ void setKey(Buffer key);
AuthTag calc(const Buffer& buf);
+protected:
+ static const char* MIN_GCRYPT_VERSION;
+ gcry_md_hd_t ctx_;
};
#endif