I'm using .NET 2.0 (RSACryptoServiceProvider.SignData) to generate a
signature, then I'm verifying that signature in c++ using Crypto++
with the following code snippet:

    vector<uint8_t> key;  // Populated with key bytes loaded from X.
509 ASN.1 file created by Crypto++
    vector<uint8_t> message;  // Bytes of message
    vector<uint8_t> signature;  // Bytes of signature

    RSASS<PKCS1v15, SHA>::Verifier verifier(ArraySource(&key[0],
key.size(), true));

    if (ArraySource(&signature[0], signature.size(),
true).MaxRetrievable() != verifier.SignatureLength())
    {
        return false;
    }

    return verifier.VerifyMessage(&bytes[0], bytes.size(), &signature
[0], signature.size());

This code snippet is wrapped in a try/catch that handles
CryptoPP::Exception's. This code seems to be working, but it is
different from the RSA signature verification code listed in
'test.cpp', and as this is my first exposure to Crypto++ so I want to
make sure I'm using the library correctly. Am I missing anything here?
--~--~---------~--~----~------------~-------~--~----~
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