diff options
author | Jack Lloyd <[email protected]> | 2017-09-16 14:45:52 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-09-16 14:45:52 -0400 |
commit | 83932f30ff02d285c8a7e2a363601f460d55d268 (patch) | |
tree | 4bb4a54d89c8584bea8fa19774e9e22ae77278cf /src/lib/misc/cryptobox | |
parent | f39aa7bb4e43e27b10d3f890da7ba1acba9f14ca (diff) |
Use constant_time_compare instead of same_mem
New name, same great operation
Diffstat (limited to 'src/lib/misc/cryptobox')
-rw-r--r-- | src/lib/misc/cryptobox/cryptobox.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/misc/cryptobox/cryptobox.cpp b/src/lib/misc/cryptobox/cryptobox.cpp index 944adef49..0ff6fe8f5 100644 --- a/src/lib/misc/cryptobox/cryptobox.cpp +++ b/src/lib/misc/cryptobox/cryptobox.cpp @@ -145,7 +145,7 @@ std::string decrypt(const uint8_t input[], size_t input_len, uint8_t computed_mac[MAC_OUTPUT_LEN]; BOTAN_ASSERT_EQUAL(MAC_OUTPUT_LEN, pipe.read(computed_mac, MAC_OUTPUT_LEN, 1), "MAC size"); - if(!same_mem(computed_mac, + if(!constant_time_compare(computed_mac, &ciphertext[VERSION_CODE_LEN + PBKDF_SALT_LEN], MAC_OUTPUT_LEN)) throw Decoding_Error("CryptoBox integrity failure"); |