diff --git a/test/crypto/tea.cpp b/test/crypto/tea.cpp index 76ff60dd..2a437840 100644 --- a/test/crypto/tea.cpp +++ b/test/crypto/tea.cpp @@ -9,8 +9,8 @@ main () // test vectors from 'TeaCrypt', by Logan J. Drews. struct { std::array key; - std::vector dec; - std::vector enc; + std::array dec; + std::array enc; } TESTS[] = { { @@ -44,8 +44,7 @@ main () const auto &t = TESTS[i]; util::crypto::TEA gen (t.key); - std::vector enc (t.dec.size ()), - dec (t.enc.size ()); + std::array enc, dec; gen.encrypt (enc.data (), t.dec.data (), t.dec.size ()); gen.decrypt (dec.data (), t.enc.data (), t.enc.size ()); @@ -53,13 +52,13 @@ main () { std::ostringstream os; os << "TEA_enc " << i; - tap.expect (std::equal (enc.begin (), enc.end (), t.enc.begin ()), os.str ()); + tap.expect (enc == t.enc, os.str ()); } { std::ostringstream os; os << "TEA_dec " << i; - tap.expect (std::equal (dec.begin (), dec.end (), t.dec.begin ()), os.str ()); + tap.expect (dec == t.dec, os.str ()); } }