From adcf8c9b1bd1b47e00bf859693112cea1f7e8c9f Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Mon, 10 Aug 2026 20:36:50 +0800 Subject: [Tooling] Complete backend tooling and validation --- backend/include/rcc/Support/Error.h | 6 ++++++ backend/include/rcc/Support/SHA256.h | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 backend/include/rcc/Support/SHA256.h (limited to 'backend/include/rcc/Support') diff --git a/backend/include/rcc/Support/Error.h b/backend/include/rcc/Support/Error.h index 63c0b2f..0429cc0 100644 --- a/backend/include/rcc/Support/Error.h +++ b/backend/include/rcc/Support/Error.h @@ -30,6 +30,12 @@ enum class ErrorCode : std::uint8_t { FixupApplicationFailed, RelocationFailed, ObjectWritingFailed, + InvalidInvocation, + ManifestError, + CacheMiss, + ReproducerError, + ReductionFailed, + FuzzingFailure, }; [[nodiscard]] std::string_view getErrorCodeName(ErrorCode Code) noexcept; diff --git a/backend/include/rcc/Support/SHA256.h b/backend/include/rcc/Support/SHA256.h new file mode 100644 index 0000000..ff7b50b --- /dev/null +++ b/backend/include/rcc/Support/SHA256.h @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +#ifndef RCC_SUPPORT_SHA256_H +#define RCC_SUPPORT_SHA256_H + +#include +#include +#include +#include +#include +#include + +namespace rcc { + +using SHA256Digest = std::array; + +[[nodiscard]] SHA256Digest sha256(std::span Input); +[[nodiscard]] SHA256Digest sha256(std::string_view Input); +[[nodiscard]] std::string sha256Hex(std::span Input); +[[nodiscard]] std::string sha256Hex(std::string_view Input); + +} // namespace rcc + +#endif // RCC_SUPPORT_SHA256_H -- cgit v1.2.3