![]() |
Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
|
DEMO |
SHA-256 hash function (NIST FIPS 180-4). More...
#include <array>#include <cstddef>#include <cstdint>#include <cstring>#include <vector>Go to the source code of this file.
Namespaces | |
| namespace | signet |
| namespace | signet::forge |
| namespace | signet::forge::crypto |
| namespace | signet::forge::crypto::detail |
| namespace | signet::forge::crypto::detail::sha256 |
Functions | |
| constexpr uint32_t | signet::forge::crypto::detail::sha256::rotr (uint32_t x, int n) |
| Right-rotate a 32-bit word by n bits. | |
| constexpr uint32_t | signet::forge::crypto::detail::sha256::Ch (uint32_t x, uint32_t y, uint32_t z) |
| SHA-256 logical functions (FIPS 180-4 Section 4.1.2) | |
| constexpr uint32_t | signet::forge::crypto::detail::sha256::Maj (uint32_t x, uint32_t y, uint32_t z) |
| constexpr uint32_t | signet::forge::crypto::detail::sha256::Sigma0 (uint32_t x) |
| constexpr uint32_t | signet::forge::crypto::detail::sha256::Sigma1 (uint32_t x) |
| constexpr uint32_t | signet::forge::crypto::detail::sha256::sigma0 (uint32_t x) |
| constexpr uint32_t | signet::forge::crypto::detail::sha256::sigma1 (uint32_t x) |
| uint32_t | signet::forge::crypto::detail::sha256::load_be32 (const uint8_t *p) |
| Load a big-endian uint32 from 4 bytes. | |
| void | signet::forge::crypto::detail::sha256::store_be32 (uint8_t *p, uint32_t v) |
| Store a uint32 as 4 big-endian bytes. | |
| void | signet::forge::crypto::detail::sha256::store_be64 (uint8_t *p, uint64_t v) |
| Store a uint64 as 8 big-endian bytes. | |
| void | signet::forge::crypto::detail::sha256::compress (uint32_t h[8], const uint8_t block[64]) |
| Process a single 64-byte (512-bit) message block. | |
| std::array< uint8_t, 32 > | signet::forge::crypto::detail::sha256::sha256 (const uint8_t *data, size_t size) |
| Compute SHA-256 hash of arbitrary-length input. | |
| std::array< uint8_t, 32 > | signet::forge::crypto::detail::sha256::sha256 (const std::vector< uint8_t > &data) |
| Convenience overload: hash a vector of bytes. | |
| std::array< uint8_t, 32 > | signet::forge::crypto::detail::sha256::sha256_concat (const uint8_t *a, size_t a_size, const uint8_t *b, size_t b_size) |
| Hash concatenation of two byte spans with domain separation: SHA-256(label || a || b). | |
SHA-256 hash function (NIST FIPS 180-4).
Public-standard cryptographic hash — no proprietary IP. Extracted for clean tier separation: Tier 1 (AGPL-3.0-or-later) consumers (hkdf.hpp, audit_chain.hpp, row_lineage.hpp) can use SHA-256 without depending on any commercial or proprietary header.
Reference: NIST FIPS 180-4 — Secure Hash Standard (SHS)
Definition in file sha256.hpp.