cwist
Modern C web framework with libttak runtime
Loading...
Searching...
No Matches
sha256.h File Reference

Minimal self-contained SHA-256 and HMAC-SHA256 (RFC 4634 style). More...

#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
Include dependency graph for sha256.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cwist_sha256_ctx
 

Macros

#define CWIST_SHA256_DIGEST_LEN   32
 

Detailed Description

Minimal self-contained SHA-256 and HMAC-SHA256 (RFC 4634 style).

Header-only (all functions static): exists so the WASM build can verify session-cookie signatures without pulling OpenSSL/boringssl into WASM_SRCS. The native build keeps using OpenSSL HMAC; this header is the Emscripten (and any other constrained-target) fallback selected in session.c. Not a general-purpose crypto API - just what signed sessions need.

Definition in file sha256.h.

Macro Definition Documentation

◆ CWIST_SHA256_DIGEST_LEN

#define CWIST_SHA256_DIGEST_LEN   32

Definition at line 21 of file sha256.h.