Skip to main content

Module security_patterns

Module security_patterns 

Source
Expand description

Security-aware error handling patterns

Functionsยง

constant_time_compare
Example: Constant-time string comparison for security
handle_auth_error
Example: Handle authentication errors securely
handle_resource_limit
Example: Handle resource exhaustion with rate limiting
handle_threat
Example: Handle threat detection without information leakage
handle_timeout
Example: Timeout handling that prevents timing attacks