From de5c4f910203dd976ad8c17eff90874f548d6bc3 Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Thu, 31 Jan 2008 11:39:39 +0000 Subject: packet and cypher fixes --- encryptedPacket.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'encryptedPacket.h') diff --git a/encryptedPacket.h b/encryptedPacket.h index 7b70e17..83b831e 100644 --- a/encryptedPacket.h +++ b/encryptedPacket.h @@ -34,7 +34,7 @@ #include "datatypes.h" #include "buffer.h" #include "authTag.h" - +class Cypher; class EncryptedPacket : public Buffer { public: @@ -98,7 +98,7 @@ public: * Get the maximum payload size * @return maximum payload size */ - u_int32_t getSize() const; + u_int32_t getMaxLength() const; /** * Set the real length of the payload @@ -111,6 +111,8 @@ public: AuthTag getAuthTag() const; void setAuthTag(AuthTag& tag); + void setPayloadLength(u_int8_t payload_length); + // bool hasHeader() const; // Packet& withHeader(bool b); @@ -131,9 +133,13 @@ private: struct HeaderStruct* header_; AuthTag* auth_tag_; - u_int32_t size_; + u_int32_t max_length_; static const u_int32_t AUTHTAG_SIZE = 10; // 10byte +protected: + friend class Cypher; + u_int8_t * payload_; + u_int32_t payload_length_; }; #endif -- cgit v1.2.3