Skip to main content

Module secret

Module secret 

Source
Expand description

Secret string ownership, redaction, and masking.

Structs§

SecretString
An owned string that zeroizes its allocation on drop and redacts its debug output.

Constants§

REDACTED
Placeholder used in Debug impls to redact secret fields.

Functions§

mask_api_key
Masks an API key by showing only the first and last 4 characters.
redact_option
Replaces a present value with REDACTED while preserving absence.
zeroize_json_value
Zeroizes every owned string contained in a JSON value.