password_guard_io library

Platform-specific password_guard entry point for native platforms (VM / dart:io).

Contains EnvPepperProvider which depends on dart:io and is not compatible with Web.

Classes

AlgorithmConfig
Base class for all algorithm configuration objects.
Argon2Config
Configuration for Argon2id hashing.
BcryptConfig
Configuration for bcrypt hashing.
EnvPepperProvider
Reads the pepper from an environment variable.
MemoryPepperProvider
Stores the pepper in memory.
PassphraseGenerator
Generates secure, readable, easy-to-remember passphrases.
PasswordGenerator
Generates secure random passwords.
PasswordGuard
The main entry point for password_guard.
PasswordHashResult
The result returned from PasswordGuard.hash.
PasswordPolicy
Defines and enforces password rules.
PasswordStrength
Checks password strength and returns a score with suggestions.
PasswordStrengthResult
The result of a password strength check.
PasswordValidationResult
Result of a PasswordPolicy.validate call.
PBKDF2Config
Configuration for PBKDF2-HMAC-SHA256 hashing.
PepperProvider
Abstract interface for providing pepper values.
SaltGenerator
Generates cryptographically secure random salts.
SecureRandom
Provides cryptographically secure random values.

Enums

PasswordAlgorithm
Supported password hashing algorithms.
StrengthLevel
The strength level of a password.

Extensions

PasswordAlgorithmExtension on PasswordAlgorithm
Returns the AlgorithmConfig identifier string for a given algorithm.
StrengthLevelExtension on StrengthLevel
Extension to get display labels for StrengthLevel.

Exceptions / Errors

InvalidConfigurationException
Thrown when algorithm configuration values are invalid or unsafe.
InvalidHashException
Thrown when a hash string cannot be parsed or is malformed.
PasswordGuardException
Base exception for all password_guard errors.
PasswordPolicyException
Thrown when a password policy validation fails.
PepperException
Thrown when pepper retrieval fails.
UnsupportedAlgorithmException
Thrown when an algorithm is not supported on the current platform.