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

PolCredBase.h

00001 /*
00002  * Copyright 2003 Michael A. Marsh, Cornell University. All rights reserved.
00003  * This software is released under the modified BSD license.
00004  * See the file LICENSE in the top-level directory for details.
00005  */
00006 //
00007 // $Id: PolCredBase.h,v 1.3 2004/05/19 15:56:47 mmarsh Exp $
00008 //
00009 // $Log: PolCredBase.h,v $
00010 // Revision 1.3  2004/05/19 15:56:47  mmarsh
00011 // *** empty log message ***
00012 //
00013 // Revision 1.2  2003/11/04 22:31:47  mmarsh
00014 // *** empty log message ***
00015 //
00016 //
00017 
00018 #ifndef __CODEX_CIPHERS_POLCREDBASE_H__
00019 #define __CODEX_CIPHERS_POLCREDBASE_H__
00020 
00021 #include "RSA.h"
00022 #include "HashFunction.h"
00023 
00024 namespace CODEX_Ciphers
00025 {
00031    class PolCredBase : public CODEX_ASN1::Base
00032    {
00033       public :
00035          PolCredBase();
00037          PolCredBase( const RSAPublicKey& publicKey,
00038                       const RSASignature& signature );
00051          PolCredBase( const RSAPublicKey& publicKey,
00052                       const RSAPrivateKey& signingKey,
00053                       const HashFunction& hashFunc );
00055          PolCredBase( const PolCredBase& aCred );
00057          virtual ~PolCredBase() {}
00058 
00060          void operator=( const PolCredBase& aCred );
00061 
00063          const RSAPublicKey& publicKey() const { return m_publicKey; }
00065          const RSASignature& signature() const { return m_signature; }
00066 
00074          bool verify( const RSAPublicKey& delegator,
00075                       const HashFunction& hashFunc ) const;
00076 
00078          int marshal( unsigned char ** pp ) const;
00080          void* unmarshal( void* bogus, unsigned char ** pp, long length );
00081 
00082       private :
00083          static BIGNUM * digest( const RSAPublicKey& publicKey,
00084                                  const HashFunction& hashFunc );
00085 
00086          RSAPublicKey m_publicKey;
00087          RSASignature m_signature;
00088    };
00089 }
00090 
00091 #endif /* __CODEX_CIPHERS_POLCREDBASE_H__ */

Generated on Wed Jun 2 16:32:55 2004 for COrnell Data EXchange (CODEX) by doxygen1.2.18