#pragma once #include #include // SHA256 round constants (shared across implementations) extern const uint32_t K[64]; // Initial hash values static const uint32_t H0[8] = { 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 }; // Transform one 64-byte block, updating state[8] typedef void (*TransformFunc)(uint32_t* state, const uint8_t* block); // Detect best available implementation at runtime TransformFunc detect_best_transform(void); // Generic C implementation (always available) void transform_generic(uint32_t* state, const uint8_t* block);