blob: 77e5a262028892708535fbec5e737530338a2371 [file] [log] [blame]
// Copyright 2020 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "brillo/secure_string.h"
#include <openssl/crypto.h>
namespace brillo {
BRILLO_DISABLE_ASAN void SecureClearBytes(void* v, size_t n) {
OPENSSL_cleanse(v, n);
}
int SecureMemcmp(const void* s1, const void* s2, size_t n) {
return CRYPTO_memcmp(s1, s2, n);
}
} // namespace brillo