Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CODEX_ASN1::Integer Class Reference

Serializable representation of an integer. More...

#include <Integer.h>

Inheritance diagram for CODEX_ASN1::Integer:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Integer ()
 Default constructor, for creating an object to be unmarshalled.
 Integer (int value)
 Create an Integer with a given integer value.
 Integer (const ASN1_INTEGER *asn1)
 Create an Integer based on a given ASN.1 specification.
 Integer (const Integer &aInt)
 Create an Integer from another Integer.
virtual ~Integer ()
 Destructor -- frees the stored ASN1_INTEGER.
void operator= (const Integer &aInt)
 Assignment operator.
int value () const
 Integer representation of the Integer.
const ASN1_INTEGER * asn1 () const
 ASN.1 representation of the Integer.
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.
bool initialized () const

Protected Attributes

bool m_initialized
 Has this object been initialized yet, or is it still blank?

Detailed Description

Serializable representation of an integer.

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

Definition at line 33 of file Integer.h.


Member Function Documentation

bool CODEX_ASN1::Base::initialized  )  const [inline, inherited]
 

Returns:
Has this object been initialized?

Definition at line 175 of file Base.h.

References CODEX_ASN1::Base::m_initialized.

Referenced by CODEX_APSS::SecretManagement::addComputeMsg(), CODEX_APSS::SecretManagement::addEstablishMsg(), CODEX_APSS::SecretManagement::addEstablishResponse(), CODEX_APSS::SecretManagement::addInitMsg(), CODEX_APSS::SecretManagement::addSharing(), CODEX_APSS::SecretManagement::addSubsharing(), CODEX_VSS::Combinatoric< NumT, ThreshT >::apply(), CODEX_Server::ServerState::caKey(), CODEX_KeyService::ClientCreateCallback::ClientCreateCallback(), CODEX_VSS::Combinatoric< NumT, ThreshT >::count(), CODEX_Server::QuorumBuilderAct::handler(), CODEX_APSS::MessageVerifier::handler(), CODEX_KeyService::DelegateResponseVerifier::handler(), CODEX_KeyService::DelegateRequestDistributor::handler(), CODEX_KeyService::ClientMessageVerifier::handler(), CODEX_KeyService::ClientMessageSigner::handler(), CODEX_VSS::SubshareLabel< LabelType >::marshal(), CODEX_KeyService::KeyInfo::marshal(), CODEX_VSS::LabeledShare< ShareType, OneWay >::marshal(), CODEX_VSS::ShareLabel< _ShareType, _OneWay >::marshal(), CODEX_VSS::ModExpFunctionalArgs::marshal(), CODEX_VSS::Combinatoric< NumT, ThreshT >::marshal(), CODEX_KeyService::SignWriteCallback::operator()(), CODEX_KeyService::SignReadCallback::operator()(), CODEX_KeyService::SignCreateCallback::operator()(), CODEX_VSS::ModExpFunctional::operator()(), CODEX_KeyService::ClientReadCallback::operator()(), CODEX_KeyService::ClientCreateCallback::operator()(), CODEX_VSS::Combinatoric< NumT, ThreshT >::operator+=(), CODEX_Server::ServerState::readElGamalShares(), CODEX_VSS::Combinatoric< NumT, ThreshT >::recover(), CODEX_APSS::SecretManagement::sendFinished(), CODEX_Server::ServerState::serviceKey(), CODEX_Server::ServerState::setEGShareCallback(), and CODEX_Server::ServerState::setRSAShareCallback().

int Integer::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 77 of file Integer.cc.

Referenced by CODEX_KeyService::ClientMessageSigner::handler(), CODEX_VSS::SubshareLabel< LabelType >::marshal(), CODEX_KeyService::KeyInfo::marshal(), CODEX_VSS::ShareLabel< _ShareType, _OneWay >::marshal(), CODEX_Server::ServerSignature::marshal(), CODEX_APSS::RecoverMsg::marshal(), CODEX_APSS::RecoveredMsg::marshal(), CODEX_APSS::InitMsg::marshal(), CODEX_APSS::FinishedMsg::marshal(), CODEX_APSS::EstablishMsg::marshal(), CODEX_APSS::EstablishedMsg::marshal(), CODEX_APSS::ContributeMsg::marshal(), CODEX_APSS::ComputeMsg::marshal(), CODEX_APSS::ComputedMsg::marshal(), CODEX_VSS::Combinatoric< NumT, ThreshT >::marshal(), and CODEX_Client::Client::toFile().

void * Integer::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 83 of file Integer.cc.

Referenced by CODEX_Client::Client::fromFile(), CODEX_KeyService::ClientReadCallback::operator()(), CODEX_VSS::SubshareLabel< LabelType >::unmarshal(), CODEX_KeyService::KeyInfo::unmarshal(), CODEX_VSS::ShareLabel< _ShareType, _OneWay >::unmarshal(), CODEX_Server::ServerSignature::unmarshal(), CODEX_APSS::RecoverMsg::unmarshal(), CODEX_APSS::RecoveredMsg::unmarshal(), CODEX_APSS::InitMsg::unmarshal(), CODEX_APSS::FinishedMsg::unmarshal(), CODEX_APSS::EstablishMsg::unmarshal(), CODEX_APSS::EstablishedMsg::unmarshal(), CODEX_APSS::ContributeMsg::unmarshal(), CODEX_APSS::ComputeMsg::unmarshal(), CODEX_APSS::ComputedMsg::unmarshal(), CODEX_VSS::Combinatoric< NumT, ThreshT >::unmarshal(), and CODEX_ASN1::Array< CODEX_ASN1::BigNumber >::unmarshal().


The documentation for this class was generated from the following files:
Generated on Fri May 6 17:41:49 2005 for COrnell Data EXchange (CODEX) by  doxygen 1.4.1