blob: 03fb98d5c5172699c2933c52133c4de2666d901f [file] [log] [blame]
// Copyright 2017 The Fuchsia 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 "src/lib/crypto_util/hash.h"
#include <openssl/sha.h>
namespace cobalt::crypto::hash {
bool Hash(const byte *data, const size_t data_len, byte out[DIGEST_SIZE]) {
return nullptr != SHA256(const_cast<uint8_t *>(data), data_len, static_cast<uint8_t *>(out));
}
} // namespace cobalt::crypto::hash