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

RSAPlaintextPK.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: RSAPlaintextPK.h,v 1.4 2004/05/19 15:56:47 mmarsh Exp $
00008 //
00009 // $Log: RSAPlaintextPK.h,v $
00010 // Revision 1.4  2004/05/19 15:56:47  mmarsh
00011 // *** empty log message ***
00012 //
00013 // Revision 1.3  2003/11/04 22:31:48  mmarsh
00014 // *** empty log message ***
00015 //
00016 //
00017 
00018 #ifndef __CODEX_CIPHERS_RSAPLAINTEXTPK_H__
00019 #define __CODEX_CIPHERS_RSAPLAINTEXTPK_H__
00020 
00021 #include "CODEX_ASN1/Base.h"
00022 #include "CODEX_ASN1/SecureBigNumber.h"
00023 #include "CODEX_ASN1/Array.h"
00024 #include "RSA.h"
00025 #include "HashFunction.h"
00026 
00027 namespace CODEX_Ciphers
00028 {
00037    class RSAPlaintextPK : public CODEX_ASN1::Base
00038    {
00039       public :
00041          typedef CODEX_ASN1::Array< CODEX_ASN1::BigNumber >  ArrayType;
00042 
00044          RSAPlaintextPK();
00045 
00054          RSAPlaintextPK( const CODEX_ASN1::SecureBigNumber& plaintext,
00055                          const RSAPublicKey& publicKey,
00056                          const CODEX_ASN1::Base& id,
00057                          const HashFunction& hashFunc );
00058 
00060          RSAPlaintextPK( const RSAPlaintextPK& aPPK );
00061 
00063          virtual ~RSAPlaintextPK();
00064 
00066          void operator=( const RSAPlaintextPK& aPPK );
00067 
00069          bool verify( const RSACipherText& ciphertext,
00070                       const RSAPublicKey& publicKey,
00071                       const CODEX_ASN1::Base& id,
00072                       const HashFunction& hashFunc ) const;
00073 
00074          int marshal( unsigned char ** pp ) const;
00075          void* unmarshal( void* bogus, unsigned char ** pp, long length );
00076 
00077       private :
00078          ArrayType  m_a;
00079          ArrayType  m_b;
00080    };
00081 
00082 }
00083 
00084 #endif /* __CODEX_CIPHERS_RSAPLAINTEXTPK_H__ */

Generated on Fri May 6 17:41:02 2005 for COrnell Data EXchange (CODEX) by  doxygen 1.4.1