Module Auth.Nonce_counter

type t

Mutable nonce count tracker, keyed by server nonce

val create : unit -> t

Create a new nonce counter

val next : t -> nonce:string -> string

next t ~nonce gets and increments the count for the given server nonce. Returns the count formatted as 8 hex digits (e.g., "00000001").

val clear : t -> unit

Clear all tracked nonces (e.g., on session reset)