On Monday, July 22, 2013 9:42:06 AM UTC-4, Stefano Mtangoo wrote:
>
>
>
> 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:
>>>
>>>
>>> I have tried both solutions does not work. I have tried all I could with 
>>>> no avail.
>>>>
>>> See http://www.cryptopp.com/wiki/DefaultEncryptorWithMAC.
>>>  ...
>>>
>>
> Don't know why but this works
>
...
 

>         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();
>
Its the same code as in the wiki page, sans the use of a StringSource or 
FileSource.

The StringSource or FileSource will call Put2 on its data, and them call 
MessageEnd (IIRC). Put2 pumps data to its attached transformation, and in 
the case of the wiki page that's the HexDecoder. Though you did not use a 
StringSource or FileSource, you did the same.

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