On Monday, July 22, 2013 12:11:33 PM UTC+3, Stefano Mtangoo wrote:
>
>
>
> On Monday, July 22, 2013 9:47:59 AM UTC+3, Jeffrey Walton wrote:
>>
>>
>>
>> On Friday, July 19, 2013 3:30:08 PM UTC-4, Stefano Mtangoo wrote:
>>
>>> ...
>>>
>>> I have tried both solutions does not work. I have tried all I could with 
>>> no avail.
>>>
>> See http://www.cryptopp.com/wiki/DefaultEncryptorWithMAC.
>>  
>>
>>> Can you try to decrypt this string below and see if it works? I want to 
>>> confirm its not something funny with the encryption nor password!
>>>
>>> String: 
>>> C53ED32B2F20C2C19786F507671D9BA6AE80298C1C6C04583037498F4A910A3255FD02E53664118AEA315A577A80FCEF
>>> Password: password
>>>
>> $ ./cryptopp-test.exe
>> Decrypted: 2013-07-19
>>
> Correct! 
> Can you post the function you used to decrypt it?
> Mine fails! 
>

Don't know why but this works

wxString DecryptString(const wxString& instr, const wxString& passPhrase)
{
    std::string outstr; 

    try
    { 
        CryptoPP::HexDecoder decryptor(new 
CryptoPP::DefaultDecryptorWithMAC(passPhrase.ToStdString().c_str(), new 
CryptoPP::StringSink(outstr)));
        decryptor.Put((byte *)instr.ToStdString().data(), 
instr.ToStdString().size());
        decryptor.MessageEnd();

        return outstr;
    }
    catch (CryptoPP::Exception& e)
    {
        wxPuts(e.what());
    }

    return wxString(outstr);
}


 

>
>> Jeff
>>
>>  
>>
>

-- 
-- 
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.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to