[email protected] | 3cdf6d4 | 2011-10-07 17:02:48 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 | // Use of this source code is governed by a BSD-style license that can be | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
[email protected] | 3cdf6d4 | 2011-10-07 17:02:48 | [diff] [blame] | 5 | #include "crypto/secure_util.h" |
6 | |||||
David Benjamin | 9ae51bb | 2018-09-26 20:30:39 | [diff] [blame] | 7 | #include "third_party/boringssl/src/include/openssl/mem.h" |
8 | |||||
[email protected] | 3cdf6d4 | 2011-10-07 17:02:48 | [diff] [blame] | 9 | namespace crypto { |
10 | |||||
11 | bool SecureMemEqual(const void* s1, const void* s2, size_t n) { | ||||
David Benjamin | 9ae51bb | 2018-09-26 20:30:39 | [diff] [blame] | 12 | return CRYPTO_memcmp(s1, s2, n) == 0; |
[email protected] | 3cdf6d4 | 2011-10-07 17:02:48 | [diff] [blame] | 13 | } |
14 | |||||
15 | } // namespace crypto | ||||
16 |