diff options
author | lloyd <[email protected]> | 2013-03-28 17:30:46 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2013-03-28 17:30:46 +0000 |
commit | a659cfe131ca4ea8b68c6e5b2082d3b03080800b (patch) | |
tree | 0ad4664467ee32e7e6a547768835c2e5a9b83dd8 /checks/ocb.cpp | |
parent | 3bd9e5c14a7e244a5c154db3c821e69cad3df08c (diff) |
Update test
Diffstat (limited to 'checks/ocb.cpp')
-rw-r--r-- | checks/ocb.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/checks/ocb.cpp b/checks/ocb.cpp index c5d38c65b..df9c5089e 100644 --- a/checks/ocb.cpp +++ b/checks/ocb.cpp @@ -26,7 +26,9 @@ std::vector<byte> ocb_encrypt(const SymmetricKey& key, ocb.start(&nonce[0], nonce.size()); secure_vector<byte> buf(pt, pt+pt_len); - ocb.finish(buf); + ocb.update(buf, 0); + ocb.finish(buf, buf.size()); + //ocb.finish(buf); return unlock(buf); } @@ -44,7 +46,9 @@ std::vector<byte> ocb_decrypt(const SymmetricKey& key, ocb.start(&nonce[0], nonce.size()); secure_vector<byte> buf(ct, ct+ct_len); - ocb.finish(buf); + ocb.update(buf, 0); + ocb.finish(buf, buf.size()); + //ocb.finish(buf); return unlock(buf); } @@ -77,7 +81,7 @@ std::vector<byte> ocb_encrypt(OCB_Encryption& ocb, ocb.start(&nonce[0], nonce.size()); secure_vector<byte> buf(pt.begin(), pt.end()); - ocb.finish(buf); + ocb.finish(buf, 0); return unlock(buf); } |