Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

CODEX_ASN1::OctetString Class Reference

Serializable representation of a byte string. More...

#include <OctetString.h>

Inheritance diagram for CODEX_ASN1::OctetString:

Inheritance graph
[legend]
Collaboration diagram for CODEX_ASN1::OctetString:

Collaboration graph
[legend]
List of all members.

Public Methods

 OctetString ()
 Default constructor, for creating an object to be unmarshalled.

 OctetString (const ustring &value)
 Create an OctetString for a given character string.

 OctetString (const ASN1_OCTET_STRING *asn1)
 Create an OctetString based on a given ASN.1 specification.

 OctetString (const OctetString &aOS)
 Create an OctetString from another OctetString.

virtual ~OctetString ()
 Destructor -- frees the stored ASN1_OCTET_STRING.

void operator= (const OctetString &aOS)
 Assignment operator.

ustring value () const
 
Returns:
string representation of the OctetString


const ASN1_OCTET_STRING * asn1 () const
 
Returns:
ASN.1 representation of the OctetString


int marshal (unsigned char **pp) const
 This function creates a serialized representation of the object, which is returned through the argument pp.

void * unmarshal (void *bogus, unsigned char **pp, long length)
 This function takes a serialized representation of the object and recreates the object representation.


Detailed Description

Serializable representation of a byte string.

Constructors other than the default will initialize both the string value and the ASN.1 representation.

Definition at line 30 of file OctetString.h.


Member Function Documentation

int OctetString::marshal unsigned char **    pp const [virtual]
 

This function creates a serialized representation of the object, which is returned through the argument pp.

This must be overridden by the concrete derived class.

Parameters:
pp  Serialized form of the object
Returns:
Length of the marshalled data

Implements CODEX_ASN1::Base.

Definition at line 80 of file OctetString.cc.

Referenced by CODEX_Client::WriteKeyMsg::marshal(), CODEX_Client::ReadKeyMsg::marshal(), CODEX_Client::KeyStoredMsg::marshal(), CODEX_Client::CreateKeyMsg::marshal(), CODEX_Client::BoundNameMsg::marshal(), CODEX_Client::BlindKeyMsg::marshal(), and CODEX_KeyService::StateInfo::synchronize().

void * OctetString::unmarshal void *    bogus,
unsigned char **    pp,
long    length
[virtual]
 

This function takes a serialized representation of the object and recreates the object representation.

This must be overridden by the concrete derived class.

Parameters:
bogus  Included for compatibility with OpenSSL ASN.1 macros
pp  Serialized form of the data
length  Number of bytes of pp to unmarshal
Returns:
success or failure of the unmarshalling

Implements CODEX_ASN1::Base.

Definition at line 86 of file OctetString.cc.

References CODEX_ASN1::Base::m_initialized.

Referenced by CODEX_KeyService::StateInfo::synchronize(), CODEX_Client::WriteKeyMsg::unmarshal(), CODEX_Client::ReadKeyMsg::unmarshal(), CODEX_Client::KeyStoredMsg::unmarshal(), CODEX_Client::CreateKeyMsg::unmarshal(), CODEX_Client::BoundNameMsg::unmarshal(), and CODEX_Client::BlindKeyMsg::unmarshal().


The documentation for this class was generated from the following files:
Generated on Wed Jun 2 16:33:03 2004 for COrnell Data EXchange (CODEX) by doxygen1.2.18