On Wednesday, August 2, 2017 at 8:09:55 AM UTC-4, Daniel Karcz wrote:
>
> Hello Everyone,
>
> I'm moving myself from my own C AES C Library to Crypto++.
>
> ...
>
> Can Somebody explain me where exactly in this piece of code encryption have 
> place?
> In C library I have function which I have to call to encrypt data, it look 
> similar to
>
> encrypt(plain_text, cipher_text, key);
>
> I know that encryption is made in try{} block, but I see only class 
> declaration, key setting and after that is StringSource which Is transform 
> bytes into string.
>
>
You are using a Pipeline. Obviously, Crypto++ has them just like Unix and 
Linux. Also see https://www.cryptopp.com/wiki/Pipelining .

In a pipeline, data flows from a source to a sink. In between there are 
filters which transform the data. The Crypto++ code above is a lot like the 
following Unix commands:

    cat plain.txt | enc -k key -m ecb | hex -e > cipher.txt

The StreamTransformationFilter is the heavy lifter. It accumulates incoming 
plain text. It adds padding to the final block. It also accumulates cipher 
text until you retireve it. Its a very complex filter.

Another filter is the HexEncoder. Its easy to understand its operation.

You might be interested in https://www.cryptopp.com/wiki/Init-Update-Final. 
It kind of presents Crypto++'s objects in a Java-esque kind of way.

Jeff

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscr...@googlegroups.com.
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 cryptopp-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to