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

CODEX_VSS::SecretWitness< _ShareType, _OneWay > Class Template Reference

Serializable class holding the verification information for a secret and the arguments needed to construct the one-way function used to compute and test verification shares. More...

#include <ShareLabel.h>

Inheritance diagram for CODEX_VSS::SecretWitness< _ShareType, _OneWay >:

Inheritance graph
[legend]
Collaboration diagram for CODEX_VSS::SecretWitness< _ShareType, _OneWay >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef CODEX_ASN1::Base BaseType
 Export the base class type.

typedef _ShareType ShareType
 Export the share type.

typedef _OneWay OneWay
 Export the one-way function type.

typedef VRecon< ShareType,
OneWay >::ValueType 
WitnessType
 Short name for the witness type.

typedef ShareType::ValueType ValueType
 Short name for the share value type.

typedef OneWay::CtorArgs ArgsType
 Short name for the constructor arguments to OneWay.


Public Methods

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

 SecretWitness (const WitnessType &witness, const ArgsType &args)
 Constructor taking a witness and one-way function ctor args.

 SecretWitness (const SecretWitness< ShareType, OneWay > &aOther)
 Copy constructor.

 ~SecretWitness ()
 Virtual destructor.

void operator= (const SecretWitness< ShareType, OneWay > &aOther)
 Assignment operator.

const WitnessTypewitness () const
 
Returns:
The witness for the secret.


const ArgsTypeargs () const
 
Returns:
The arguments for the one-way function constructor.


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.

void toFile (const char *fname) const
 Store the shares in a file.

void * fromFile (const char *fname)
 Read shares from a file.


Detailed Description

template<class _ShareType, class _OneWay>
class CODEX_VSS::SecretWitness< _ShareType, _OneWay >

Serializable class holding the verification information for a secret and the arguments needed to construct the one-way function used to compute and test verification shares.

Definition at line 522 of file ShareLabel.h.


Member Function Documentation

template<class _ShareType, class _OneWay>
int CODEX_VSS::SecretWitness< _ShareType, _OneWay >::marshal unsigned char **    pp const [inline, 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 579 of file ShareLabel.h.

Referenced by CODEX_VSS::SecretWitness< ShareType, OneWay >::toFile().

template<class _ShareType, class _OneWay>
void* CODEX_VSS::SecretWitness< _ShareType, _OneWay >::unmarshal void *    bogus,
unsigned char **    pp,
long    length
[inline, 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 595 of file ShareLabel.h.

Referenced by CODEX_VSS::SecretWitness< ShareType, OneWay >::fromFile().


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