summaryrefslogtreecommitdiff
path: root/test/crypto_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-29 09:14:20 +0200
committerCarl Hetherington <cth@carlh.net>2021-04-29 20:53:49 +0200
commit39fb8198febde1937019db1c300ec363aab5aa56 (patch)
tree52bc32134e8ae2b5587b3a62130baa9acf815b60 /test/crypto_test.cc
parentb249700e1da7dd6631a8b4440587f4093a2bdef1 (diff)
C++11 tidying.
Diffstat (limited to 'test/crypto_test.cc')
-rw-r--r--test/crypto_test.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/crypto_test.cc b/test/crypto_test.cc
index 26c6748b8..53451b352 100644
--- a/test/crypto_test.cc
+++ b/test/crypto_test.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2018-2021 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -18,15 +18,18 @@
*/
+
#include "lib/crypto.h"
#include "lib/exceptions.h"
#include "test.h"
#include <openssl/rand.h>
#include <boost/test/unit_test.hpp>
+
using std::string;
using std::list;
+
BOOST_AUTO_TEST_CASE (crypto_test)
{
dcp::ArrayData key (dcpomatic::crypto_key_length());
@@ -34,7 +37,7 @@ BOOST_AUTO_TEST_CASE (crypto_test)
RAND_bytes (key.data(), dcpomatic::crypto_key_length());
- dcp::ArrayData ciphertext = dcpomatic::encrypt ("Can you see any fish?", key, iv);
+ auto ciphertext = dcpomatic::encrypt ("Can you see any fish?", key, iv);
BOOST_REQUIRE_EQUAL (dcpomatic::decrypt (ciphertext, key, iv), "Can you see any fish?");
key.data()[5]++;