Crypto Middleware
    Preparing search index...

    Interface MiddlewareConfig

    Configuration for the crypto middleware.

    const config: MiddlewareConfig = {
    key: process.env.CRYPTO_KEY,
    routes: ["/api/**"],
    operations: ["decrypt-request", "encrypt-response"],
    };
    interface MiddlewareConfig {
        key?: string;
        routes?: string[];
        operations?: (
            | "decrypt-request"
            | "encrypt-response"
            | "verify-signature"
            | "verify-jwt"
        )[];
        hmacKey?: string;
        jwtSecret?: string;
    }
    Index
    key?: string

    Hex-encoded key for payload encryption/decryption.

    routes?: string[]

    Routes to apply middleware to (glob patterns).

    operations?: (
        | "decrypt-request"
        | "encrypt-response"
        | "verify-signature"
        | "verify-jwt"
    )[]

    Operations to perform.

    hmacKey?: string

    HMAC key for webhook signature verification (hex-encoded).

    jwtSecret?: string

    JWT public key or secret for verification.