diff options
Diffstat (limited to 'src/authAlgo.h')
-rw-r--r-- | src/authAlgo.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/authAlgo.h b/src/authAlgo.h index 3074014..1e86407 100644 --- a/src/authAlgo.h +++ b/src/authAlgo.h @@ -37,11 +37,15 @@ #include "encryptedPacket.h" #ifndef NO_CRYPT -#ifndef USE_SSL_CRYPTO -#include <gcrypt.h> -#else + +#if defined(USE_SSL_CRYPTO) #include <openssl/hmac.h> +#elif defined(USE_NETTLE) +#include <nettle/hmac.h> +#else // USE_GCRYPT is the default +#include <gcrypt.h> #endif + #endif #include "keyDerivation.h" @@ -95,10 +99,12 @@ public: static const uint32_t DIGEST_LENGTH = 20; private: -#ifndef USE_SSL_CRYPTO - gcry_md_hd_t handle_; -#else +#if defined(USE_SSL_CRYPTO) HMAC_CTX ctx_; +#elif defined(USE_NETTLE) + struct hmac_sha1_ctx ctx_; +#else // USE_GCRYPT is the default + gcry_md_hd_t handle_; #endif Buffer key_; |