diff options
author | lloyd <[email protected]> | 2014-01-07 11:03:55 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2014-01-07 11:03:55 +0000 |
commit | c109c7f84fcef6ba895c6293508b2deae0e803c1 (patch) | |
tree | 35ba7b55914023a77ecfbcf5dee2befcc4e275d1 /src/tests/test_transform.cpp | |
parent | a7e3abf95fd1bc3df45be6fc9cb82e28e0a727ea (diff) |
Rename test sources
Diffstat (limited to 'src/tests/test_transform.cpp')
-rw-r--r-- | src/tests/test_transform.cpp | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/src/tests/test_transform.cpp b/src/tests/test_transform.cpp deleted file mode 100644 index e53b5b800..000000000 --- a/src/tests/test_transform.cpp +++ /dev/null @@ -1,50 +0,0 @@ -#include "tests.h" - -#include <botan/botan.h> -#include <botan/transform.h> -#include <botan/threefish.h> -#include <botan/benchmark.h> -#include <botan/hex.h> -#include <iostream> -#include <fstream> - -using namespace Botan; - -namespace { - -Transformation* get_transform(const std::string& algo) - { - throw std::runtime_error("Unknown transform " + algo); - } - -secure_vector<byte> transform_test(const std::string& algo, - const secure_vector<byte>& nonce, - const secure_vector<byte>& key, - const secure_vector<byte>& in) - { - std::unique_ptr<Transformation> transform(get_transform(algo)); - - transform->set_key(key); - transform->start_vec(nonce); - - secure_vector<byte> out = in; - transform->update(out, 0); - - return out; - } - -} - -size_t test_transform() - { - std::ifstream vec(TEST_DATA_DIR "/transform.vec"); - - return run_tests(vec, "Transform", "Output", true, - [](std::map<std::string, std::string> m) - { - return hex_encode(transform_test(m["Transform"], - hex_decode_locked(m["Nonce"]), - hex_decode_locked(m["Key"]), - hex_decode_locked(m["Input"]))); - }); - } |