Path: blob/main/contrib/llvm-project/compiler-rt/lib/fuzzer/FuzzerSHA1.h
35262 views
//===- FuzzerSHA1.h - Internal header for the SHA1 utils --------*- C++ -* ===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7// SHA1 utils.8//===----------------------------------------------------------------------===//910#ifndef LLVM_FUZZER_SHA1_H11#define LLVM_FUZZER_SHA1_H1213#include "FuzzerDefs.h"14#include <cstddef>15#include <stdint.h>1617namespace fuzzer {1819// Private copy of SHA1 implementation.20static const int kSHA1NumBytes = 20;2122// Computes SHA1 hash of 'Len' bytes in 'Data', writes kSHA1NumBytes to 'Out'.23void ComputeSHA1(const uint8_t *Data, size_t Len, uint8_t *Out);2425std::string Sha1ToString(const uint8_t Sha1[kSHA1NumBytes]);2627std::string Hash(const Unit &U);2829} // namespace fuzzer3031#endif // LLVM_FUZZER_SHA1_H323334