Skip to main content

Module core

Module core 

Source
Expand description

Small shared utilities: base64, sha256 (SHA-256, HMAC-SHA256) and the New trait (a constructor used across the crate, much like Default).

Modules§

base64
Base64 encoding and decoding of byte arrays (standard alphabet). See the tests in this module for usage.
sha256
SHA-256 (FIPS 180-4) and HMAC-SHA256 (RFC 2104), for code that must sign or verify without an optional crypto dependency — e.g. the MCP server’s requestState (MCP 2026-07-28). Not constant-time beyond verify’s comparison; not for secrets that a timing side channel would expose.
x509
X.509 certificate validity (notBefore/notAfter) and the RFC 9773 ARI certificate id, read with a minimal DER walker — shared by ACME renewal and the TLS certificate-expiry metric, so it isn’t behind a feature. Certificate bytes may come from a CA or a file: every length is checked, nothing panics on malformed input.

Traits§

New