diff options
Diffstat (limited to 'buffer.h')
-rw-r--r-- | buffer.h | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -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_; |