diff options
author | Simon Warta <[email protected]> | 2015-06-30 10:38:52 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-06-30 10:38:52 +0200 |
commit | abe4c5c8d9b88aafa6f8b745f9100d4dbd754e20 (patch) | |
tree | 295eafb79cab7843888133abbad07fb983915520 /src/tests/test_ocb.cpp | |
parent | b90187419f64b6d38d19c888985d58f902336677 (diff) | |
parent | 1de5fc1419add86884df97580d7a2e745ad43bff (diff) |
Merge pull request #154 from webmaster128/bounds-fixes
Remainings fixes before Botan runs fine in debug mode
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); |