On 22/07/2013 09:52 alasiri, Jeffrey Walton wrote:
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
<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.
All in all am glad it works now and I can proceed with my stalled program.
I hope next stages won't be that hectic :)
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 a topic in the
Google Groups "Crypto++ Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/cryptopp-users/16U0M2B_V7Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.
--
Stefano D. Mtangoo
Mob: +255 754710410
Twitter: @mtangoo
Web. http://hosannahighertech.co.tz
Linkedin: http://www.linkedin.com/pub/stefano-mtangoo/45/644/281
/The purpose of man is to know his Maker Be known by his Maker
And make his Maker known So that others may know his Maker as their
Maker(Emeal Zwayne) /
--
--
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.