summaryrefslogtreecommitdiff
path: root/buffer.h
diff options
context:
space:
mode:
authorErwin Nindl <nine@wirdorange.org>2007-11-07 19:08:25 +0000
committerErwin Nindl <nine@wirdorange.org>2007-11-07 19:08:25 +0000
commitdd056636dd2cd8c83822ebecfc2448cf8b4b713c (patch)
treee2ca8e3f9565f7da7a7bbbd9a8d9ebd317b2e5b1 /buffer.h
parenti bin da beste deshalb haut des jetzt endlich so hin (diff)
* TunDevice: changed 'char* getTypeString()' to 'const char* getTypeString()'
to fix warning: deprecated conversion from string constant to ‘char*’ * removed libsrtp, use libgcrypt instead now * added buffer funcitons TODO: * fix IV issues * add authentification
Diffstat (limited to 'buffer.h')
-rw-r--r--buffer.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/buffer.h b/buffer.h
index 0506e98..37bbc29 100644
--- a/buffer.h
+++ b/buffer.h
@@ -45,6 +45,13 @@ public:
virtual ~Buffer();
Buffer(const Buffer &src);
void operator=(const Buffer &src);
+ void operator=(const seq_nr_t &src);
+ void operator=(const sender_id_t &src);
+
+ // math operations to calculate IVs and keys
+ virtual Buffer operator^(const Buffer &xor_by) const;
+ virtual Buffer leftByteShift(u_int32_t width) const;
+ virtual Buffer rightByteShift(u_int32_t width) const;
u_int32_t resizeFront(u_int32_t new_length);
u_int32_t resizeBack(u_int32_t new_length);
@@ -54,12 +61,12 @@ public:
u_int8_t operator[](u_int32_t index) const;
void printHexDump() const;
-protected:
operator u_int8_t*(); // just for write/read tun and packetSource
+protected:
friend class TunDevice;
friend class UDPPacketSource;
- friend class AesIcmCypher;
- friend class KeyDerivation; //
+// friend class AesIcmCypher;
+// friend class KeyDerivation; //
u_int8_t *buf_;
u_int32_t length_;