aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes/aead/ocb
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-09-16 14:45:52 -0400
committerJack Lloyd <[email protected]>2017-09-16 14:45:52 -0400
commit83932f30ff02d285c8a7e2a363601f460d55d268 (patch)
tree4bb4a54d89c8584bea8fa19774e9e22ae77278cf /src/lib/modes/aead/ocb
parentf39aa7bb4e43e27b10d3f890da7ba1acba9f14ca (diff)
Use constant_time_compare instead of same_mem
New name, same great operation
Diffstat (limited to 'src/lib/modes/aead/ocb')
-rw-r--r--src/lib/modes/aead/ocb/ocb.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/modes/aead/ocb/ocb.cpp b/src/lib/modes/aead/ocb/ocb.cpp
index aa8532526..4e1076cba 100644
--- a/src/lib/modes/aead/ocb/ocb.cpp
+++ b/src/lib/modes/aead/ocb/ocb.cpp
@@ -409,7 +409,7 @@ void OCB_Decryption::finish(secure_vector<uint8_t>& buffer, size_t offset)
// compare mac
const uint8_t* included_tag = &buf[remaining];
- if(!same_mem(mac.data(), included_tag, tag_size()))
+ if(!constant_time_compare(mac.data(), included_tag, tag_size()))
throw Integrity_Failure("OCB tag check failed");
// remove tag from end of message