diff options
author | Simon Warta <[email protected]> | 2015-06-29 13:11:23 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-06-30 10:38:23 +0200 |
commit | 8668ce8753b10e944bdc72b6e66d752759c7e710 (patch) | |
tree | 787e9829c871748b34594d35f3a5e6569ccdbb31 /src/tests/test_ocb.cpp | |
parent | b90187419f64b6d38d19c888985d58f902336677 (diff) |
tests: Convert &vec[0] to vec.data()
Diffstat (limited to 'src/tests/test_ocb.cpp')
-rw-r--r-- | src/tests/test_ocb.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tests/test_ocb.cpp b/src/tests/test_ocb.cpp index c27753214..513b34dc2 100644 --- a/src/tests/test_ocb.cpp +++ b/src/tests/test_ocb.cpp @@ -25,9 +25,9 @@ std::vector<byte> ocb_encrypt(OCB_Encryption& enc, const std::vector<byte>& pt, const std::vector<byte>& ad) { - enc.set_associated_data(&ad[0], ad.size()); + enc.set_associated_data(ad.data(), ad.size()); - enc.start(&nonce[0], nonce.size()); + enc.start(nonce.data(), nonce.size()); secure_vector<byte> buf(pt.begin(), pt.end()); enc.finish(buf, 0); @@ -36,9 +36,9 @@ std::vector<byte> ocb_encrypt(OCB_Encryption& enc, { secure_vector<byte> ct = buf; - dec.set_associated_data(&ad[0], ad.size()); + dec.set_associated_data(ad.data(), ad.size()); - dec.start(&nonce[0], nonce.size()); + dec.start(nonce.data(), nonce.size()); dec.finish(ct, 0); |