X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fcrypto_test.cc;h=53451b352360b2d3ec386b97822d9bf214ccbe16;hb=c8a036eb727ceddc64a0304d781c916eb952c001;hp=26c6748b8bd453bc8a2f472d267469c58d3be03b;hpb=6fa9748f382302fa88292b4219598bb81edc7bd0;p=dcpomatic.git 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 + Copyright (C) 2018-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,15 +18,18 @@ */ + #include "lib/crypto.h" #include "lib/exceptions.h" #include "test.h" #include #include + 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]++;