Skip to main content

Module generator

Module generator 

Source
Expand description

Replacement generation strategies.

Two concrete implementations:

  • HmacGenerator: Deterministic, seeded with a 32-byte key. Same seed + same input = same output across runs. Uses HMAC-SHA256 for domain separation.
  • RandomGenerator: Cryptographically random replacements. Non-deterministic.

Both produce category-aware, format-preserving replacements.

§Design Note

This module contains the category-aware formatters used by the CLI binary. For an extensible strategy API that allows custom replacement logic, see the crate::strategy module.

Structs§

HmacGenerator
Deterministic replacement generator seeded with a 32-byte key.
RandomGenerator
Random replacement generator using OS CSPRNG.

Traits§

ReplacementGenerator
Strategy for generating a sanitized replacement value.