![]() |
Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
|
DEMO |
Functions | |
| constexpr uint32_t | rotr (uint32_t x, int n) |
| Right-rotate a 32-bit word by n bits. | |
| constexpr uint32_t | Ch (uint32_t x, uint32_t y, uint32_t z) |
| SHA-256 logical functions (FIPS 180-4 Section 4.1.2) | |
| constexpr uint32_t | Maj (uint32_t x, uint32_t y, uint32_t z) |
| constexpr uint32_t | Sigma0 (uint32_t x) |
| constexpr uint32_t | Sigma1 (uint32_t x) |
| constexpr uint32_t | sigma0 (uint32_t x) |
| constexpr uint32_t | sigma1 (uint32_t x) |
| uint32_t | load_be32 (const uint8_t *p) |
| Load a big-endian uint32 from 4 bytes. | |
| void | store_be32 (uint8_t *p, uint32_t v) |
| Store a uint32 as 4 big-endian bytes. | |
| void | store_be64 (uint8_t *p, uint64_t v) |
| Store a uint64 as 8 big-endian bytes. | |
| void | compress (uint32_t h[8], const uint8_t block[64]) |
| Process a single 64-byte (512-bit) message block. | |
| std::array< uint8_t, 32 > | sha256 (const uint8_t *data, size_t size) |
| Compute SHA-256 hash of arbitrary-length input. | |
| std::array< uint8_t, 32 > | sha256 (const std::vector< uint8_t > &data) |
| Convenience overload: hash a vector of bytes. | |
| std::array< uint8_t, 32 > | 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). | |
|
inlineconstexpr |
SHA-256 logical functions (FIPS 180-4 Section 4.1.2)
Definition at line 64 of file sha256.hpp.
|
inline |
Process a single 64-byte (512-bit) message block.
FIPS 180-4 Section 6.2.2: SHA-256 hash computation. Updates the 8-word hash state h[0..7] with one message block.
Definition at line 120 of file sha256.hpp.
|
inline |
Load a big-endian uint32 from 4 bytes.
Definition at line 89 of file sha256.hpp.
|
inlineconstexpr |
Definition at line 68 of file sha256.hpp.
|
inlineconstexpr |
Right-rotate a 32-bit word by n bits.
Definition at line 59 of file sha256.hpp.
|
inline |
Convenience overload: hash a vector of bytes.
Definition at line 215 of file sha256.hpp.
|
inline |
Compute SHA-256 hash of arbitrary-length input.
Returns a 32-byte (256-bit) digest.
Implements the full FIPS 180-4 algorithm:
Definition at line 165 of file sha256.hpp.
|
inline |
Hash concatenation of two byte spans with domain separation: SHA-256(label || a || b).
Used for hybrid key combining and HMAC-style constructions.
Domain separation label prevents cross-protocol attacks per NIST SP 800-227 (Final, Sep 2025) ยง4.2 and Barker & Roginsky "Transitioning the Use of Cryptographic Algorithms" guidance.
Definition at line 226 of file sha256.hpp.
|
inlineconstexpr |
Definition at line 72 of file sha256.hpp.
|
inlineconstexpr |
Definition at line 80 of file sha256.hpp.
|
inlineconstexpr |
Definition at line 76 of file sha256.hpp.
|
inlineconstexpr |
Definition at line 84 of file sha256.hpp.
|
inline |
Store a uint32 as 4 big-endian bytes.
Definition at line 97 of file sha256.hpp.
|
inline |
Store a uint64 as 8 big-endian bytes.
Definition at line 105 of file sha256.hpp.