You have missed this statement
#include "md2.h"

> -----Messaggio originale-----
> Da: Kim Hyung Chan [mailto:[EMAIL PROTECTED]
> Inviato: martedi 3 dicembre 2002 16.15
> A: [EMAIL PROTECTED]
> Oggetto: RSASSA_PKCS1v15_MD2_Signer
> 
> 
> Hello,
> I tried to compile below.
> With RSASSA_PKCS1v15_MD5, it's quite well in compiling.
> But, with RSASSA_PKCS1v15_MD2, i met some trouble in compiling.    
> Is there something what i have to be caeful in using 
> RSASSA_PKCS1v15_MD2??
> 
> Thanks ahead.
> 
> Source code
> ---------------------------------------------------------
>     FileSource privKeyFile( "./privkey.txt",
>                         true, new Base64Decoder );
>     RSASSA_PKCS1v15_MD2_Signer privKey( privKeyFile );
>     //RSASSA_PKCS1v15_MD5_Signer privKey( privKeyFile );
> 
>     unsigned char *sign_dat;
>     sign_dat = new unsigned char [privKey.SignatureLength()];
> 
>     cout << privKey.SignatureLength() << endl;
> 
>     AutoSeededRandomPool rng;
>     privKey.SignMessage( rng, hash_dat, 32, sign_dat);
> 
>     // verification ==========================================
>     FileSource pubKeyFile( "./pubkey.txt",
>                         true, new Base64Decoder );
>     RSASSA_PKCS1v15_MD2_Verifier pubKey( pubKeyFile );
>     //RSASSA_PKCS1v15_MD5_Verifier pubKey( pubKeyFile );
>     if(pubKey.VerifyMessage(hash_dat, 32, sign_dat) == true)
>         cout << "verification succeeded..." << endl;
>     else
>         cout << "verification failed..." << endl;
> 
>     delete [] sign_dat;
> ----------------------------------------------------------
> Error message with RSASSA_PKCS1v15_MD2 ( gcc 2.96 )
> 
> [EMAIL PROTECTED] term1]$ g++ -o test test.cpp -I../crypto50 
> -L../crypto50 -lcryptopp
> ../crypto50/pkcspad.h: In instantiation of 
> `CryptoPP::PKCS_DecoratedHashModule<CryptoPP::MD2>':
> ../crypto50/pubkey.h:417:   instantiated from 
> `CryptoPP::PK_SignatureSchemeBase<H, INTERFACE, 
> DS_INTERFACE>::NewMessageAccumulator () const [with H = 
> CryptoPP::PKCS_DecoratedHashModule<CryptoPP::MD2>, INTERFACE 
> = CryptoPP::PK_Verifier, DS_INTERFACE = CryptoPP::DigestVerifier]'
> ../crypto50/iterhash.h:46:   instantiated from here
> ../crypto50/pkcspad.h:34: invalid use of undefined type `class 
> CryptoPP::MD2'
> ../crypto50/pkcspad.h:69: forward declaration of `class CryptoPP::MD2'
> ../crypto50/pkcspad.h:34: confused by earlier errors, bailing out
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Hyung Chan Kim
> 
> Security Group, Concurrent System Research Laboratory
> Dept. of Information and Communications
> Kwangju Institute of Science and Technology (K-JIST)
> 1 Oryong-dong Buk-ku Gwangju 500-712, Rep. of Korea
> 
> E-Mail : [EMAIL PROTECTED]
> Phone : +82-62-970-2266
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> 
> 
> 

Reply via email to