diff options
author | Erwin Nindl <nine@wirdorange.org> | 2007-12-12 16:10:58 +0000 |
---|---|---|
committer | Erwin Nindl <nine@wirdorange.org> | 2007-12-12 16:10:58 +0000 |
commit | 974d6973f4479c0f5bacc0a5ce07a5cfc62bb01c (patch) | |
tree | d537dabd53431fd071e24812982964ebdae2f2f7 /authAlgo.h | |
parent | added 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.h | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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 |