Skip to main content

Module secrets

Module secrets 

Source
Expand description

Secret wrapper types for sensitive data

This module provides newtype wrappers for sensitive data types. The wrappers leverage the secrecy crate’s SecretString type internally for automatic memory zeroing and debug redaction, while adding serialization support needed for environment configuration storage.

Structs§

ApiToken
A wrapper type for API tokens that prevents accidental exposure.
Password
A wrapper type for passwords that prevents accidental exposure.

Traits§

ExposeSecret
Expose a reference to an inner secret

Functions§

generate_random_password
Generate a cryptographically secure MySQL-compatible password.

Type Aliases§

PlainApiToken
Plain API token used in DTOs for serialization/deserialization.
PlainPassword
Plain password used in DTOs for serialization/deserialization.