openikev2::Transform Class Reference

This class represents a transform (cryptographic algorithm), used in a cryptographic suite negociation. More...

#include <transform.h>

Inheritance diagram for openikev2::Transform:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Transform (Enums::TRANSFORM_TYPE type, uint16_t id)
 Creates a new Transform, setting its type and its id.
 Transform (Enums::TRANSFORM_TYPE type, uint16_t id, uint16_t keylen)
 Creates a new Transform, setting its type, its id and adding a TransformAttribute of type ATTR_KEY_LEN.
 Transform (ByteBuffer &byte_buffer)
 Creates a new Transform based on its binary representation.
auto_ptr< Transformclone () const
 Creates a new Transform clonning this.
void addAttribute (auto_ptr< TransformAttribute > attribute)
 Adds a TransformAttribute to the Transform.
bool hasAttribute (const TransformAttribute &transform_attribute) const
 Indicates if the Transform has the indicate attribute.
virtual void getBinaryRepresentation (ByteBuffer &byte_buffer) const
 Appends the binary representation of the Transform in the ByteBuffer.
virtual bool operator== (const Transform &other) const
 Compares if this Transform object is equal to other.
virtual string toStringTab (uint8_t tabs) const
 Construct a textual representation of the object, preceded of a num of tabs of size TAB_SIZE.

Public Attributes

uint16_t id
 ID of the transform (DES, 3DES, .
Enums::TRANSFORM_TYPE type
 Type of the transform (ENCR, PRF, .
AutoVector< TransformAttributeattributes
 Transform attributes collection.

Detailed Description

This class represents a transform (cryptographic algorithm), used in a cryptographic suite negociation.

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


Constructor & Destructor Documentation

openikev2::Transform::Transform ( Enums::TRANSFORM_TYPE  type,
uint16_t  id 
)

Creates a new Transform, setting its type and its id.

Parameters:
type Type of the transform (ENCR, PRF, ...)
id ID of the transform (DES, 3DES, ...)

openikev2::Transform::Transform ( Enums::TRANSFORM_TYPE  type,
uint16_t  id,
uint16_t  keylen 
)

Creates a new Transform, setting its type, its id and adding a TransformAttribute of type ATTR_KEY_LEN.

Parameters:
type Type of the transform (ENCR, PRF, ...)
id ID of the transform (DES, 3DES, ...)
keylen Value of the ATTR_KEY_LEN attribute

openikev2::Transform::Transform ( ByteBuffer byte_buffer  ) 

Creates a new Transform based on its binary representation.

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


Member Function Documentation

auto_ptr< Transform > openikev2::Transform::clone (  )  const

Creates a new Transform clonning this.

Returns:
New cloned Transform

void openikev2::Transform::addAttribute ( auto_ptr< TransformAttribute attribute  ) 

Adds a TransformAttribute to the Transform.

Parameters:
attribute TransformAttribute to be added.

bool openikev2::Transform::hasAttribute ( const TransformAttribute transform_attribute  )  const

Indicates if the Transform has the indicate attribute.

Parameters:
transform_attribute Searched TransformAttribute
Returns:
TRUE if the Transform has the indicated attribute. FALSE otherwise

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

Appends the binary representation of the Transform in the ByteBuffer.

Parameters:
byte_buffer ByteBuffer where append the binary representation

bool openikev2::Transform::operator== ( const Transform other  )  const [virtual]

Compares if this Transform object is equal to other.

Parameters:
other The other Transform
Returns:
TRUE if both are equals, FALSE otherwise

string openikev2::Transform::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::Printable.


Member Data Documentation

uint16_t openikev2::Transform::id

ID of the transform (DES, 3DES, .

..)

Enums::TRANSFORM_TYPE openikev2::Transform::type

Type of the transform (ENCR, PRF, .

..)


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