summaryrefslogtreecommitdiff
path: root/encryptedPacket.h
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-03-03 17:59:57 +0000
committerChristian Pointner <equinox@anytun.org>2008-03-03 17:59:57 +0000
commit30dbbc65bd3684b9cefa000069b611a608f4be3e (patch)
tree68614a0ccd2a68c3fcd90b5a7652f798f795d50e /encryptedPacket.h
parentadded showtable (diff)
some bugfixes
added support for authentication
Diffstat (limited to 'encryptedPacket.h')
-rw-r--r--encryptedPacket.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/encryptedPacket.h b/encryptedPacket.h
index bb143f9..fc6fe96 100644
--- a/encryptedPacket.h
+++ b/encryptedPacket.h
@@ -33,7 +33,7 @@
#include "datatypes.h"
#include "buffer.h"
-#include "authTag.h"
+
class Cipher;
class EncryptedPacket : public Buffer
{
@@ -114,12 +114,14 @@ public:
u_int8_t* getPayload();
+ u_int8_t* getAuthenticatedPortion();
+ u_int32_t getAuthenticatedPortionLength();
- bool hasAuthTag() const;
void withAuthTag(bool b);
- AuthTag getAuthTag() const;
- void setAuthTag(AuthTag& tag);
-
+ void addAuthTag();
+ void removeAuthTag();
+ u_int8_t* getAuthTag();
+ u_int32_t getAuthTagLength();
private:
EncryptedPacket();
@@ -136,7 +138,7 @@ private:
struct HeaderStruct* header_;
u_int8_t * payload_;
- AuthTag* auth_tag_;
+ u_int8_t * auth_tag_;
static const u_int32_t AUTHTAG_SIZE = 10; // TODO: hardcoded size
};