[botan-devel] DataSink/Source issue

Nick Sorrell cincyfire at gmail.com
Fri Feb 15 18:16:23 EST 2013


I'm not sure if this is an issue, a gotcha, or a feature request:

The problem was that I kept getting authentication errors (using AES/EAX)
and incomplete decryption.  When I added code to flush the encryption pipe
DataSink, the errors went away.  The code looks something like this (all in
one function):

DataSource_Stream in("testfile.txt");
Pipe encryptionPipe(get_cipher("AES-128/EAX", key, iv, Botan::ENCRYPTION),
new DataSink_Stream("encFile.txt"));
encryptionPipe.process_msg(in);
//flush DataSink_Stream here for success

DataSource_Stream encInput("encFile.txt");
Pipe decryptionPipe(get_cipher("AES-128/EAX", key, iv, Botan::DECRYPTION),
new DataSink_Stream("decFile.txt"));
decryptionPipe.process_msg(encInput);

This isn't a big issue, as it's not how I will ultimately be using it, but
it was confusing for testing purposes, and I'm not sure if it points to a
bigger problem.

Btw, I love this crypto library. Thanks!
-Nick Sorrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.randombit.net/pipermail/botan-devel/attachments/20130215/f5d3c73b/attachment.html>


More information about the botan-devel mailing list