• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2011 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "crypto/secure_util.h"
6 
7 #include "third_party/boringssl/src/include/openssl/mem.h"
8 
9 namespace crypto {
10 
SecureMemEqual(base::span<const uint8_t> s1,base::span<const uint8_t> s2)11 bool SecureMemEqual(base::span<const uint8_t> s1,
12                     base::span<const uint8_t> s2) {
13   return s1.size() == s2.size() &&
14          CRYPTO_memcmp(s1.data(), s2.data(), s1.size()) == 0;
15 }
16 
17 }  // namespace crypto
18 
19