Module secure_utils

Module secure_utils 

Source

Structs§

SecureComparison
Secure comparison utilities
SecureRandomGen
Generate secure random values
SecureString
A secure string that is automatically zeroized when dropped
SecureValidation
Input validation with security considerations

Functions§

constant_time_compare
Performs constant-time comparison of two byte slices to prevent timing attacks.
generate_secure_token
Generates a cryptographically secure random token as a base64-encoded string.
hash_password
Hashes a password using bcrypt with a secure cost factor.
verify_password
Verifies a plaintext password against a bcrypt hash.