openikev2::Payload_SK Class Reference

This class represents an Encripted Payload. More...

#include <payload_sk.h>

Inheritance diagram for openikev2::Payload_SK:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Payload_SK (Cipher &cipher, ByteArray &decrypted_body)
 Creates a new Payload_SK.
 Payload_SK (ByteBuffer &byte_buffer)
 Creates a new Payload_SK based on its binary representation.
 Payload_SK (const Payload_SK &other)
 Creates a new Payload_SK cloning another one.
virtual auto_ptr< ByteArraygetDecryptedBody (Cipher &cipher)
 Gets the decripted body.
virtual void getBinaryRepresentation (ByteBuffer &byte_buffer) const
 Appends the binary representation of the Payload at the end of the buffer, without the fixed header.
virtual string toStringTab (uint8_t tabs) const
 Construct a textual representation of the object, preceded of a num of tabs of size TAB_SIZE.
virtual auto_ptr< Payloadclone () const
 Cets a clone of this payload.

Protected Attributes

auto_ptr< ByteArraypayload_data
 All the payload data (IV + encrypted payloads + padding + padding len + checksum.

Detailed Description

This class represents an Encripted Payload.

Author:
Alejandro Perez Mendez, Pedro J. Fernandez Ruiz <alejandro_perez@dif.um.es, pedroj.fernandez@dif.um.es>


Constructor & Destructor Documentation

openikev2::Payload_SK::Payload_SK ( Cipher cipher,
ByteArray decrypted_body 
)

Creates a new Payload_SK.

Parameters:
cipher Cipher used to encrypt the data
decrypted_body Data to be encrypted

openikev2::Payload_SK::Payload_SK ( ByteBuffer byte_buffer  ) 

Creates a new Payload_SK based on its binary representation.

Parameters:
byte_buffer Buffer with its read pointer at the "payload length" field

openikev2::Payload_SK::Payload_SK ( const Payload_SK other  ) 

Creates a new Payload_SK cloning another one.

Parameters:
other Other Payload_SK to be cloned


Member Function Documentation

auto_ptr< ByteArray > openikev2::Payload_SK::getDecryptedBody ( Cipher cipher  )  [virtual]

Gets the decripted body.

Parameters:
cipher Cipher to be used
Returns:
The decrypted body

void openikev2::Payload_SK::getBinaryRepresentation ( ByteBuffer byte_buffer  )  const [virtual]

Appends the binary representation of the Payload at the end of the buffer, without the fixed header.

Parameters:
byte_buffer Byte buffer where append the binary representation

Implements openikev2::Payload.

string openikev2::Payload_SK::toStringTab ( uint8_t  tabs  )  const [virtual]

Construct a textual representation of the object, preceded of a num of tabs of size TAB_SIZE.

Parameters:
tabs Num of tabs preceding the textual representation.
Returns:
Textual tabulated represetation of the object.

Implements openikev2::Payload.

auto_ptr< Payload > openikev2::Payload_SK::clone (  )  const [virtual]

Cets a clone of this payload.

Returns:
Clone of the payload.

Implements openikev2::Payload.


Generated on Fri Jul 27 11:04:55 2007 for libopenikev2 by  doxygen 1.5.1