aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_compression.cpp
Commit message (Collapse)AuthorAgeFilesLines
* move instead of copyrumcajs2018-10-141-5/+5
|
* Merge #1311 Add create and create_or_throw factories for ↵Jack Lloyd2017-11-251-0/+58
|\ | | | | | | Compression_Algorithm and Decompression_Algorithm.
| * Add create and create_or_throw factories for Compression_Algorithm and ↵Marcus Brinkmann2017-11-251-0/+58
| | | | | | | | Decompression_Algorithm.
* | Fix bzip2 compression issue.Jack Lloyd2017-11-251-18/+37
|/ | | | | | When finishing, bzip2 returns BZ_STREAM_END when it has produced all output. If we end up calling the compression routine again (even with avail_in == 0), bzip2 returns an error.
* Use explicit :: or std:: to refer to functions in namespacesJack Lloyd2017-10-011-1/+1
|
* Improve compression tests slightlyJack Lloyd2017-09-221-2/+14
| | | | | | Fix a bug that affected bzip2 - the bzip2 library does not like being called with avail_in == 0 and BZ_RUN, it returns PARAM_ERROR. Just return in that case and ignore the call.
* Add final annotations as appropriate in the test codeJack Lloyd2017-09-221-1/+1
|
* Reformat code with astyle + fix code styleTomasz Frydrych2017-05-011-1/+1
|
* Compile fixJack Lloyd2016-11-271-2/+2
|
* Avoid unused variable warning if compression disabledJack Lloyd2016-11-271-2/+2
| | | | [ci skip]
* Add test for various functions previously missed (T::clone, PBKDF::name, ↵Jack Lloyd2016-11-261-0/+2
| | | | | | | AEAD::output_length) Fix a bug in CCM, GCM, and OCB decryption which caused `output_length(tag_size())` to fail even though empty plaintexts are certainly defined for all three modes.
* Remove stray non-ASCII chars which broke compilation on non UTF-8 code pages.Jack Lloyd2016-11-021-2/+2
| | | | GH #707
* Remove Transform base classJack Lloyd2016-04-211-15/+15
| | | | | | | | | | | | | | | | | | | | | | With sufficient squinting, Transform provided an abstract base interface that covered both cipher modes and compression algorithms. However it mapped on neither of them particularly well. In addition this API had the same problem that has made me dislike the Pipe/Filter API: given a Transform&, what does it do when you put bits in? Maybe it encrypts. Maybe it compresses. It's a floor wax and a dessert topping! Currently the Cipher_Mode interface is left mostly unchanged, with the APIs previously on Transform just moved down the type hierarchy. I think there are some definite improvements possible here, wrt handling of in-place encryption, but left for a later commit. The compression API is split into two types, Compression_Algorithm and Decompression_Algorithm. Compression_Algorithm's start() call takes the compression level, allowing varying compressions with a single object. And flushing the compression state is moved to a bool param on `Compression_Algorithm::update`. All the nonsense WRT compression algorithms having zero length nonces, input granularity rules, etc as a result of using the Transform interface goes away.
* V814 Decreased performance. The 'strlen' function was called multiple times ↵Daniel Neus2016-02-081-2/+1
| | | | inside the body of a loop. test_compression.cpp 78
* Update and consolidate the test framework.Jack Lloyd2015-11-111-121/+128
| | | | | | | | | | | The tests previously had used 4 to 6 different schemes internally (the vec file reader framework, Catch, the old InSiTo Boost.Test tests, the PK/BigInt tests which escaped the rewrite in 1.11.7, plus a number of one-offs). Converge on a design that works everywhere, and update all the things. Fix also a few bugs found by the test changes: SHA-512-256 name incorrect, OpenSSL RC4 name incorrect, signature of FFI function botan_pubkey_destroy was wrong.
* Add test for compression of an empty bufferDaniel Seither2015-08-281-0/+7
| | | | | | | | | | | | This test currently fails: $ ./botan-test compression Failure testing zlib - zlib deflate error -2 Failure testing deflate - zlib deflate error -2 Failure testing gzip - zlib deflate error -2 Compression 3 tests 3 FAILs =============== Tests 3 FAILs
* Make Botan compile when only some modules are enabledSimon Warta2015-07-031-0/+9
| | | | Fixes #146.
* Replace \n by std::endl in tests to ensure proper flushingSimon Warta2015-06-191-3/+3
| | | | | | | - Remove additional newlines in CHECK_MESSAGE call - Remove redundant output of algo in aead_test() Closes #115
* Add tests for compression and SRP.lloyd2015-05-131-0/+125
Fix zlib decompression which was not ignoring Z_BUF_ERROR which is harmless in this context as process is already checking avail_in and avail_out after run returns. Bump version to 1.11.17