1 //===- FuzzerSHA1.h - Internal header for the SHA1 utils --------*- C++ -* ===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 //===----------------------------------------------------------------------===//
11 #ifndef LLVM_FUZZER_SHA1_H
12 #define LLVM_FUZZER_SHA1_H
14 #include "FuzzerDefs.h"
20 // Private copy of SHA1 implementation.
21 static const int kSHA1NumBytes = 20;
23 // Computes SHA1 hash of 'Len' bytes in 'Data', writes kSHA1NumBytes to 'Out'.
24 void ComputeSHA1(const uint8_t *Data, size_t Len, uint8_t *Out);
26 std::string Sha1ToString(const uint8_t Sha1[kSHA1NumBytes]);
28 std::string Hash(const Unit &U);
32 #endif // LLVM_FUZZER_SHA1_H