From f3cb3edb512bdcab498d825886c3366c341b3f78 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sun, 11 Dec 2016 15:28:38 -0500 Subject: Convert to using standard uintN_t integer types Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them. --- src/tests/test_ocb.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/tests/test_ocb.cpp') diff --git a/src/tests/test_ocb.cpp b/src/tests/test_ocb.cpp index 0e2dcda05..b9195a4e6 100644 --- a/src/tests/test_ocb.cpp +++ b/src/tests/test_ocb.cpp @@ -27,7 +27,7 @@ class OCB_Long_KAT_Tests : public Text_Based_Test { const size_t keylen = get_req_sz(vars, "Keylen"); const size_t taglen = get_req_sz(vars, "Taglen"); - const std::vector expected = get_req_bin(vars, "Output"); + const std::vector expected = get_req_bin(vars, "Output"); // Test from RFC 7253 Appendix A @@ -45,19 +45,19 @@ class OCB_Long_KAT_Tests : public Text_Based_Test Botan::OCB_Encryption enc(aes->clone(), taglen / 8); Botan::OCB_Decryption dec(aes->clone(), taglen / 8); - std::vector key(keylen/8); + std::vector key(keylen/8); key[keylen/8-1] = taglen; enc.set_key(key); dec.set_key(key); - const std::vector empty; - std::vector N(12); - std::vector C; + const std::vector empty; + std::vector N(12); + std::vector C; for(size_t i = 0; i != 128; ++i) { - const std::vector S(i); + const std::vector S(i); Botan::store_be(static_cast(3*i+1), &N[8]); @@ -69,7 +69,7 @@ class OCB_Long_KAT_Tests : public Text_Based_Test } Botan::store_be(static_cast(385), &N[8]); - std::vector final_result; + std::vector final_result; ocb_encrypt(result, final_result, enc, dec, N, empty, C); result.test_eq("correct value", final_result, expected); @@ -78,18 +78,18 @@ class OCB_Long_KAT_Tests : public Text_Based_Test } private: void ocb_encrypt(Test::Result& result, - std::vector& output_to, + std::vector& output_to, Botan::OCB_Encryption& enc, Botan::OCB_Decryption& dec, - const std::vector& nonce, - const std::vector& pt, - const std::vector& ad) + const std::vector& nonce, + const std::vector& pt, + const std::vector& ad) { enc.set_associated_data(ad.data(), ad.size()); enc.start(nonce.data(), nonce.size()); - Botan::secure_vector buf(pt.begin(), pt.end()); + Botan::secure_vector buf(pt.begin(), pt.end()); enc.finish(buf, 0); output_to.insert(output_to.end(), buf.begin(), buf.end()); -- cgit v1.2.3