Module utils

Module utils 

Source
Expand description

Utility functions for security operations

Structs§

SecureRandom
Secure random generator for security operations

Functions§

current_timestamp
Get current Unix timestamp
generate_api_key
Generate a secure API key
generate_jwt_secret
Generate a secure JWT secret
generate_request_id
Generate a secure request ID for tracing
generate_session_id
Generate a secure session ID
hash_api_key
Hash an API key for storage
secure_compare
Safe comparison function to prevent timing attacks
validate_api_key_format
Validate that a string looks like a valid API key
verify_api_key
Verify an API key against its hash