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

BigNumber.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: BigNumber.h,v 1.3 2004/05/19 15:56:37 mmarsh Exp $
00008 //
00009 // $Log: BigNumber.h,v $
00010 // Revision 1.3  2004/05/19 15:56:37  mmarsh
00011 // Added copyright and license statements.
00012 //
00013 // Revision 1.2  2003/11/04 22:31:46  mmarsh
00014 // *** empty log message ***
00015 //
00016 //
00017 
00018 #ifndef __CODEX_ASN1_BIGNUMBER_H__
00019 #define __CODEX_ASN1_BIGNUMBER_H__
00020 
00021 #include "Base.h"
00022 
00023 namespace CODEX_ASN1
00024 {
00031    class BigNumber : public Base
00032    {
00033       public :
00035          BigNumber();
00037          BigNumber( BIGNUM * pBN );
00039          BigNumber( const ASN1_INTEGER* asn1 );
00041          BigNumber( const BigNumber& aBN );
00043          virtual ~BigNumber();
00044 
00046          void operator=( const BigNumber& aBN );
00047 
00049          void operator=( BIGNUM * pBN );
00050 
00052          bool operator==( const BigNumber& aBN ) const;
00053 
00055          bool operator!=( const BigNumber& aBN ) const;
00056 
00058          bool operator<( const BigNumber& aBN ) const;
00059 
00061          bool operator>( const BigNumber& aBN ) const;
00062 
00064          const BIGNUM * value() const { return m_value; }
00066          const ASN1_INTEGER * asn1() const;
00067 
00068          int marshal( unsigned char ** pp ) const;
00069          void* unmarshal( void* bogus, unsigned char** pp, long length );
00070 
00071       protected :
00072          BIGNUM       *  m_value; 
00073          mutable ASN1_INTEGER *  m_asn1; 
00074    };
00075 
00076 }
00077 
00078 #endif /* __CODEX_ASN1_BIGNUMBER_H__ */

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