hyperlane-plugin-webhook 23.3.0

A production inbound HTTP webhook verification plugin for the Hyperlane framework featuring zero-allocation precomputed-midstate pure-Rust HMAC-SHA256 (Hex, Base64, and Stripe-style timestamped schemes), per-route secret rotation, timestamp skew enforcement, 64-shard bounded TTL replay-nonce caching, and verified WebhookEvent Context injection.
Documentation
//! hyperlane-plugin-webhook
//!
//! Production inbound HTTP webhook verification plugin for Hyperlane with
//! zero-allocation precomputed-midstate pure-Rust HMAC-SHA256 (`Hex`, `Base64`,
//! and Stripe-style `t=...,v1=...` schemes), per-route secret rotation,
//! timestamp skew enforcement, 64-shard bounded TTL replay-nonce caching, and
//! verified [`WebhookEvent`] `Context` injection.

mod r#const;
mod r#enum;
mod r#fn;
mod r#impl;
mod r#static;
mod r#struct;
mod r#type;

#[cfg(test)]
#[path = "../tests/mod.rs"]
mod tests;

pub use {r#const::*, r#enum::*, r#fn::*, r#struct::*};

pub(crate) use {r#static::*, r#type::*};

#[cfg(target_arch = "aarch64")]
#[cfg(target_feature = "sha2")]
#[cfg(target_endian = "little")]
use std::arch::aarch64::{
    uint32x4_t, vaddq_u32, vld1q_u8, vld1q_u32, vreinterpretq_u32_u8, vrev32q_u8, vsha256h2q_u32,
    vsha256hq_u32, vsha256su0q_u32, vsha256su1q_u32, vst1q_u32,
};
use std::{
    array::from_fn,
    cmp::Reverse,
    collections::{HashMap, VecDeque, hash_map::Entry},
    fmt::{self, Debug, Formatter},
    hash::{BuildHasherDefault, Hasher},
    sync::{
        Arc, Mutex, MutexGuard, OnceLock,
        atomic::{AtomicUsize, Ordering},
    },
    time::{Duration, SystemTime, UNIX_EPOCH},
};

use {
    hyperlane::{
        CONTENT_TYPE, Context, HttpStatus, RequestHeaders, Response, ResponseError, ServerHook,
        Status, Stream,
    },
    lombok_macros::*,
};