Hello Crypto++ gurus!

I need to create a public key based on a public pint data for future
comparation with SHA1 coded signature
here is my code:

SecByteBlock pubkey = Base64Decode(pubkey_base64);

// Thanks Wei Dai!
CryptoPP::ECIES< CryptoPP::EC2N >::PublicKey PublicKey;
PublicKey.AccessGroupParameters().Initialize(CryptoPP::ASN1::sect163k1
());

PublicKey.GetGroupParameters().GetCurve().DecodePoint(p, pubkey,
                        
PublicKey.GetGroupParameters().GetCurve().EncodedPointSize(true));
PublicKey.SetPublicElement(p);
AutoSeededX917RNG<AES> m_rng;
bool status = PublicKey.Validate(m_rng, 3); // status returns true, so
far so good
CryptoPP::ECIES<ECC_ALGORITHM>::Encryptor Encryptor(PublicKey);// At
this line I had the following exception:
----
CryptoPP::Exception caught: NameValuePairs: type mismatch for
'ThisObject:class
CryptoPP::DL_PublicKeyImpl<class CryptoPP::DL_GroupParameters_EC<class
CryptoPP:
:EC2N> >', stored 'class CryptoPP::DL_PublicKeyImpl<class
CryptoPP::DL_GroupPara
meters_EC<class CryptoPP::EC2N> >', trying to retrieve 'class
CryptoPP::DL_Publi
cKey_EC<class CryptoPP::EC2N>'
-----

Could anybody help me with this?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [EMAIL PROTECTED]
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---

Reply via email to