class NotPwnedVerifier implements UncompromisedVerifier (View source)

Properties

protected Factory $factory

The HTTP factory instance.

protected int $timeout

The number of seconds the request can run before timing out.

Methods

void
__construct(Factory $factory, int|null $timeout = null)

Create a new uncompromised verifier.

bool
verify(array $data)

Verify that the given data has not been compromised in public breaches.

array
getHash(string $value)

Get the hash and its first 5 chars.

search(string $hashPrefix)

Search by the given hash prefix and returns all occurrences of leaked passwords.

Details

void __construct(Factory $factory, int|null $timeout = null)

Create a new uncompromised verifier.

Parameters

Factory $factory
int|null $timeout

Return Value

void

bool verify(array $data)

Verify that the given data has not been compromised in public breaches.

Parameters

array $data

Return Value

bool

protected array getHash(string $value)

Get the hash and its first 5 chars.

Parameters

string $value

Return Value

array

Search by the given hash prefix and returns all occurrences of leaked passwords.

Parameters

string $hashPrefix

Return Value

Collection