The smallsha library (http://code.google.com/p/smallsha1/) does the
sha1 generation in 40 seconds. Here is the same function using
smallsha:

void search(std::string& generated_string)
{
        unsigned char hash[20];
        char hexstring[41];
        
sha1::calc(generated_string.c_str(),generated_string.length(),hash); //
10 is the length of the string
        sha1::toHexString(hash, hexstring);

        if (hexstring == password_hash)
        {
                boost::posix_time::ptime end =
boost::posix_time::microsec_clock::local_time();
                boost::posix_time::time_duration timed = end - begin;
                std::cout << "PASSWORD:\t" << generated_string << std::endl;
                std::cout << "H:M:S.ms:\t" << timed << std::endl;
                found = true;
        }
}

I can't believe that crypto++ would be that much slower. It has to be
something I'm doing wrong... any tips?

Thanks again,

Brad

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