aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_ocb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/test_ocb.cpp')
-rw-r--r--src/tests/test_ocb.cpp8
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);