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

CODEX_Ciphers::PolCredBase Class Reference

This is the base class for access policies and credentials. More...

#include <PolCredBase.h>

Inheritance diagram for CODEX_Ciphers::PolCredBase:

Inheritance graph
[legend]
Collaboration diagram for CODEX_Ciphers::PolCredBase:

Collaboration graph
[legend]
List of all members.

Public Methods

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

 PolCredBase (const RSAPublicKey &publicKey, const RSASignature &signature)
 Create PolCredBase from a public key and a signature.

 PolCredBase (const RSAPublicKey &publicKey, const RSAPrivateKey &signingKey, const HashFunction &hashFunc)
 Create PolCredBase from public and private keys and a hash function.

 PolCredBase (const PolCredBase &aCred)
 Create a PolCredBase from another PolCredBase.

virtual ~PolCredBase ()
 Virtual destructor.

void operator= (const PolCredBase &aCred)
 Assignment operator.

const RSAPublicKeypublicKey () const
 
Returns:
The public key.


const RSASignaturesignature () const
 
Returns:
Signature indicating delegated rights.


bool verify (const RSAPublicKey &delegator, const HashFunction &hashFunc) const
 Verify against a known public key.

int marshal (unsigned char **pp) const
 Serialize the object.

void * unmarshal (void *bogus, unsigned char **pp, long length)
 Unserialize the object.


Detailed Description

This is the base class for access policies and credentials.

Delegated rights are specified by a public key, which is signed by an object already possessing those rights.

Definition at line 31 of file PolCredBase.h.


Constructor & Destructor Documentation

PolCredBase::PolCredBase const RSAPublicKey   publicKey,
const RSAPrivateKey   signingKey,
const HashFunction   hashFunc
 

Create PolCredBase from public and private keys and a hash function.

Parameters:
publicKey  The public key receiving delegated rights.
signingKey  The private key used to delegate the rights.
hashFunc  The function used to create a digest of publicKey.
Exceptions:
BignumNullException  An error occurred allocating a new BIGNUM.
BignumBin2BNException  An error occurred translating a character array to a BIGNUM.

Definition at line 37 of file PolCredBase.cc.

References CODEX_Ciphers::RSAPrivateKey::sign(), and signature().


Member Function Documentation

bool PolCredBase::verify const RSAPublicKey   delegator,
const HashFunction   hashFunc
const
 

Verify against a known public key.

Parameters:
delegator  The public key of the rights granter.
hashFunc  The hash function used to make a digest of the public key.
Returns:
Success or failure of signature verification.

Definition at line 80 of file PolCredBase.cc.

References CODEX_Ciphers::RSAPublicKey::verifySignature().


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