I did it exactly like in this thread described.

I compiled the lib and included it to my project.

After this I added the following code:

#include <cryptopp/md5.h>


CryptoPP::MD5 hash;
        byte digest[ CryptoPP::MD5::DIGESTSIZE ];
        std::string message = "abcdefghijklmnopqrstuvwxyz";

        hash.CalculateDigest( digest, (const byte*)message.c_str(),
message.length() );

        CryptoPP::HexEncoder encoder;
        std::string output;
        encoder.Attach( new CryptoPP::StringSink( output ) );
        encoder.Put( digest, sizeof(digest) );
        encoder.MessageEnd();


But some error are displayed:

include/cryptopp/algparam.h: In constructor
'CryptoPP::ConstByteArrayParameter::ConstByteArrayParameter(const T&,
bool) [with T = std::basic_string<char, std::char_traits<char>,
std::allocator<char> >]':
include/cryptopp/filters.h:744: instantiated from here
include/cryptopp/algparam.h:26: warning: unused variable
'cryptopp_assert_26'

-- 
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