Documentation ¶
Overview ¶
Package passwordpwned allows you to verify if a password has been pwned (compromised) in a data breach.
The checks are performed by using the k-anonymity model of the HIBP service API (https://haveibeenpwned.com/API/v3#PwnedPasswords).
The client transmits only the first 5 characters of the SHA-1 hash of the password to query the HIBP service API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents the config options required by the Accounts client.
func (*Client) HealthCheck ¶
HealthCheck performs a status check on this service.
type HTTPClient ¶
HTTPClient contains the function to perform the actual HTTP request.
type Option ¶
type Option func(c *Client)
Option is the interface that allows to set client options.
func WithHTTPClient ¶
func WithHTTPClient(hc HTTPClient) Option
WithHTTPClient overrides the default HTTP client.
func WithRetryAttempts ¶
WithRetryAttempts overrides the default HTTP client.
func WithRetryDelay ¶
WithRetryDelay sets the delay to apply after the first failed attempt.
func WithTimeout ¶
WithTimeout overrides the default request timeout.
func WithUserAgent ¶
WithUserAgent overrides the default user-agent for service requests.