X-Git-Url: https://git.syn-net.org/debian/?a=blobdiff_plain;f=src%2FauthAlgo.h;h=758e7545002119b4767b87db92375844fd28d3ec;hb=8a36d5e03bd95d0d6429927f39d064f623960a69;hp=a1fcea403b401e9af6419cf634abdd8e0681af2c;hpb=012bc15ee82b75957d9284160fb0a0089396f0d4;p=anytun.git diff --git a/src/authAlgo.h b/src/authAlgo.h index a1fcea4..758e754 100644 --- a/src/authAlgo.h +++ b/src/authAlgo.h @@ -101,10 +101,13 @@ public: //****** Sha1AuthAlgo ****** //* HMAC SHA1 Auth Tag Generator Class +class AuthAlgoFactory; + class Sha1AuthAlgo : public AuthAlgo { + friend class AuthAlgoFactory; + public: - Sha1AuthAlgo(kd_dir_t d); ~Sha1AuthAlgo(); void generate(KeyDerivation& kd, EncryptedPacket& packet); @@ -113,8 +116,11 @@ public: static const uint32_t DIGEST_LENGTH = 20; private: + Sha1AuthAlgo(kd_dir_t d); + bool Init(); + #if defined(USE_SSL_CRYPTO) - HMAC_CTX ctx_; + HMAC_CTX *ctx_; #elif defined(USE_NETTLE) struct hmac_sha1_ctx ctx_; #else // USE_GCRYPT is the default