From 8123ce62094bf88a4107506d7acd3e8e2866bc1f Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Tue, 3 Mar 2015 15:08:56 +0000 Subject: Constant time comparison for mac --- src/ratchet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ratchet.cpp') 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; } -- cgit v1.2.3