Cryptographic plugins for HyperTTP: HTTP Digest, HMAC request signing, signature verification, and replay protection.
npm install @hyperttp/crypto @hyperttp/typesimport { withCrypto } from "@hyperttp/crypto";
client.use(
withCrypto({
hmac: {
secret: process.env.HMAC_SECRET!,
nonceHeaderName: "x-nonce",
includeHeaders: ["digest", "content-type"],
},
}),
);withCrypto() without options creates a SHA-256 Digest header only. HMAC signing requires an explicit secret and must not be used with secrets exposed to browser or mobile bundles.
See the Russian documentation for API details, server-side verification, and atomic nonce storage requirements.