API-Version
v2
Request-Methode
GET
Operation-ID
hibp-get-compromised-password-hash-range
Returns the suffixes of leaked passwords that share the first five hex characters of their SHA-1 hash, in the range format of Have I Been Pwned: one SUFFIX:COUNT line each, with 35 uppercase hex characters per suffix. Covers the public Pwned Passwords corpus and the hashes collected from our own incidents. Anyone may call it without authentication; the gateway rate limits it per IP address, or per user for authenticated callers. Credentials with a restricted scope may receive the empty degraded answer even though an anonymous request succeeds. A failed or timed-out lookup answers 200 with an empty body, both availability headers false and Cache-Control: no-store.
Request
Responses
Nutzungsbeispiele
$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/compromised-password-hashes/ranges/5BAA6
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";
const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.hibp.getCompromisedPasswordHashRange({
"hashPrefix": "5BAA6"
});
assertStatus(response, 200);
use \Mittwald\ApiClient\Generated\V2\Clients\Hibp\GetCompromisedPasswordHashRange\GetCompromisedPasswordHashRangeRequest;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
$request = (new GetCompromisedPasswordHashRangeRequest(
hashPrefix: "5BAA6"
));
$response = $client->hibp()->getCompromisedPasswordHashRange($request);
var_dump($response->getBody();