diff options
author | Christian Pointner <equinox@anytun.org> | 2009-01-15 01:00:19 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2009-01-15 01:00:19 +0000 |
commit | bb9f6547ad858b11fb29c7f1e23eddb1573bff1c (patch) | |
tree | 39eb1d0f0bc4e20dadd03518b0af5a689a639031 /src/authAlgo.h | |
parent | ported authAlgo from uanytun to anytun (diff) |
ported uanytun key derivation to anytun
no key store until now (ld_kdr gets ignored)
no multi kd until now (WritersLock instead of ReadersLock @ generate)
finally removed creepy mpi class
Diffstat (limited to 'src/authAlgo.h')
-rw-r--r-- | src/authAlgo.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/authAlgo.h b/src/authAlgo.h index be8d158..5728426 100644 --- a/src/authAlgo.h +++ b/src/authAlgo.h @@ -55,13 +55,13 @@ public: * generate the mac * @param packet the packet to be authenticated */ - virtual void generate(KeyDerivation& kd, EncryptedPacket& packet) = 0; + virtual void generate(KeyDerivation& kd, kd_dir dir, EncryptedPacket& packet) = 0; /** * check the mac * @param packet the packet to be authenticated */ - virtual bool checkTag(KeyDerivation& kd, EncryptedPacket& packet) = 0; + virtual bool checkTag(KeyDerivation& kd, kd_dir dir, EncryptedPacket& packet) = 0; }; //****** NullAuthAlgo ****** @@ -69,8 +69,8 @@ public: class NullAuthAlgo : public AuthAlgo { public: - void generate(KeyDerivation& kd, EncryptedPacket& packet); - bool checkTag(KeyDerivation& kd, EncryptedPacket& packet); + void generate(KeyDerivation& kd, kd_dir dir, EncryptedPacket& packet); + bool checkTag(KeyDerivation& kd, kd_dir dir, EncryptedPacket& packet); }; #ifndef NOCRYPT @@ -83,8 +83,8 @@ public: Sha1AuthAlgo(); ~Sha1AuthAlgo(); - void generate(KeyDerivation& kd, EncryptedPacket& packet); - bool checkTag(KeyDerivation& kd, EncryptedPacket& packet); + void generate(KeyDerivation& kd, kd_dir dir, EncryptedPacket& packet); + bool checkTag(KeyDerivation& kd, kd_dir dir, EncryptedPacket& packet); static const u_int32_t DIGEST_LENGTH = 20; |