aboutsummaryrefslogtreecommitdiff
path: root/src/ratchet.cpp
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-03-03 15:08:56 +0000
committerMark Haines <mark.haines@matrix.org>2015-03-03 15:08:56 +0000
commit8123ce62094bf88a4107506d7acd3e8e2866bc1f (patch)
treee7c4284ffbe620deebefc6c1a2db7d77c880553a /src/ratchet.cpp
parent2f2e0340ae46fb37421e13108fae71e710b5515b (diff)
Constant time comparison for mac
Diffstat (limited to 'src/ratchet.cpp')
-rw-r--r--src/ratchet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ratchet.cpp b/src/ratchet.cpp
index d2903bb..ccb8e73 100644
--- a/src/ratchet.cpp
+++ b/src/ratchet.cpp
@@ -104,7 +104,7 @@ bool verify_mac(
mac
);
- bool result = std::memcmp(mac, reader.mac, MAC_LENGTH) == 0;
+ bool result = axolotl::is_equal(mac, reader.mac, MAC_LENGTH);
axolotl::unset(mac);
return result;
}