Check text against a bcrypt hash
Checks whether a text matches a bcrypt hash.
Request
POSThttps://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt
JSON object. Required: text, hash.
Request Body
Edit the values below to test different scenarios.
Parameters and body structure are inherited from this endpoint's definition. Changes here only apply to this test run.
Language
Client
1curl --request POST \
2 --url https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt \
3 --header 'Accept: application/json' \
4 --header 'Content-Type: application/json' \
5 --header 'X-API-Key: YOUR_API_KEY' \
6 --data '{
7 "hash": "$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW",
8 "text": "hello"
9}'Check text against a bcrypt hash: Password Security API reference
Checks whether a text matches a bcrypt hash. This endpoint is part of the Password Security API: Password strength scoring, private breach checks against known leaked passwords, secure password generation, hashing and bcrypt checks.
Check text against a bcrypt hash: example requests in every language
POST /v1/verify-bcrypt in Shell (cURL)
curl --request POST \
--url https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: YOUR_API_KEY' \
--data '{
"hash": "$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW",
"text": "hello"
}'POST /v1/verify-bcrypt in Shell (HTTPie)
echo '{
"hash": "$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW",
"text": "hello"
}' | \
http POST https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt \
Accept:application/json \
Content-Type:application/json \
X-API-Key:YOUR_API_KEYPOST /v1/verify-bcrypt in Shell (Wget)
wget --quiet \
--method POST \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'X-API-Key: YOUR_API_KEY' \
--body-data '{\n "hash": "$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW",\n "text": "hello"\n}' \
--output-document \
- https://password-security-toolkit.p.apihiver.com/v1/verify-bcryptPOST /v1/verify-bcrypt in Node.js (http)
const http = require('https');
const options = {
method: 'POST',
hostname: 'password-security-toolkit.p.apihiver.com',
port: null,
path: '/v1/verify-bcrypt',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
'X-API-Key': 'YOUR_API_KEY'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
hash: '$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW',
text: 'hello'
}));
req.end();POST /v1/verify-bcrypt in Node.js (Request)
const request = require('request');
const options = {
method: 'POST',
url: 'https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
'X-API-Key': 'YOUR_API_KEY'
},
body: {
hash: '$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW',
text: 'hello'
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});POST /v1/verify-bcrypt in Node.js (Unirest)
const unirest = require('unirest');
const req = unirest('POST', 'https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt');
req.headers({
'Content-Type': 'application/json',
Accept: 'application/json',
'X-API-Key': 'YOUR_API_KEY'
});
req.type('json');
req.send({
hash: '$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW',
text: 'hello'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});POST /v1/verify-bcrypt in Node.js (Axios)
const axios = require('axios').default;
const options = {
method: 'POST',
url: 'https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
'X-API-Key': 'YOUR_API_KEY'
},
data: {
hash: '$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW',
text: 'hello'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}POST /v1/verify-bcrypt in Node.js (Fetch)
const fetch = require('node-fetch');
const url = 'https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt';
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
'X-API-Key': 'YOUR_API_KEY'
},
body: '{"hash":"$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW","text":"hello"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}POST /v1/verify-bcrypt in JavaScript (XMLHttpRequest)
const data = JSON.stringify({
hash: '$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW',
text: 'hello'
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', 'https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt');
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.setRequestHeader('Accept', 'application/json');
xhr.setRequestHeader('X-API-Key', 'YOUR_API_KEY');
xhr.send(data);POST /v1/verify-bcrypt in JavaScript (Axios)
import axios from 'axios';
const options = {
method: 'POST',
url: 'https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
'X-API-Key': 'YOUR_API_KEY'
},
data: {
hash: '$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW',
text: 'hello'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}POST /v1/verify-bcrypt in JavaScript (Fetch)
const url = 'https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt';
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
'X-API-Key': 'YOUR_API_KEY'
},
body: '{"hash":"$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW","text":"hello"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}POST /v1/verify-bcrypt in JavaScript (jQuery)
const settings = {
async: true,
crossDomain: true,
url: 'https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt',
method: 'POST',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
'X-API-Key': 'YOUR_API_KEY'
},
processData: false,
data: '{\n "hash": "$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW",\n "text": "hello"\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});POST /v1/verify-bcrypt in Python (http.client)
import http.client
conn = http.client.HTTPSConnection("password-security-toolkit.p.apihiver.com")
payload = "{\n \"hash\": \"$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW\",\n \"text\": \"hello\"\n}"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'X-API-Key': "YOUR_API_KEY"
}
conn.request("POST", "/v1/verify-bcrypt", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))POST /v1/verify-bcrypt in Python (Requests)
import requests
url = "https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt"
payload = {
"hash": "$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW",
"text": "hello"
}
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())POST /v1/verify-bcrypt in PHP (cURL)
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'hash' => '$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW',
'text' => 'hello'
]),
CURLOPT_HTTPHEADER => [
"Accept: application/json",
"Content-Type: application/json",
"X-API-Key: YOUR_API_KEY"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}POST /v1/verify-bcrypt in PHP (Guzzle)
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt', [
'body' => '{
"hash": "$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW",
"text": "hello"
}',
'headers' => [
'Accept' => 'application/json',
'Content-Type' => 'application/json',
'X-API-Key' => 'YOUR_API_KEY',
],
]);
echo $response->getBody();POST /v1/verify-bcrypt in PHP (PECL HTTP v1)
<?php
$request = new HttpRequest();
$request->setUrl('https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'YOUR_API_KEY'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'hash' => '$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW',
'text' => 'hello'
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}POST /v1/verify-bcrypt in PHP (PECL HTTP v2)
<?php
$client = new http\Client;
$request = new http\Client\Request;
$body = new http\Message\Body;
$body->append(json_encode([
'hash' => '$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW',
'text' => 'hello'
]));
$request->setRequestUrl('https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'YOUR_API_KEY'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();POST /v1/verify-bcrypt in Java (AsyncHttp)
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt")
.setHeader("Content-Type", "application/json")
.setHeader("Accept", "application/json")
.setHeader("X-API-Key", "YOUR_API_KEY")
.setBody("{\n \"hash\": \"$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW\",\n \"text\": \"hello\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();POST /v1/verify-bcrypt in Java (java.net.http)
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt"))
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("X-API-Key", "YOUR_API_KEY")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"hash\": \"$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW\",\n \"text\": \"hello\"\n}"))
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());POST /v1/verify-bcrypt in Java (OkHttp)
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"hash\": \"$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW\",\n \"text\": \"hello\"\n}");
Request request = new Request.Builder()
.url("https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt")
.post(body)
.addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("X-API-Key", "YOUR_API_KEY")
.build();
Response response = client.newCall(request).execute();POST /v1/verify-bcrypt in Java (Unirest)
HttpResponse<String> response = Unirest.post("https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("X-API-Key", "YOUR_API_KEY")
.body("{\n \"hash\": \"$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW\",\n \"text\": \"hello\"\n}")
.asString();POST /v1/verify-bcrypt in C# (HttpClient)
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt"),
Headers =
{
{ "Accept", "application/json" },
{ "X-API-Key", "YOUR_API_KEY" },
},
Content = new StringContent("{\n \"hash\": \"$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW\",\n \"text\": \"hello\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}POST /v1/verify-bcrypt in C# (RestSharp)
var client = new RestClient("https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt");
var request = new RestRequest("", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("X-API-Key", "YOUR_API_KEY");
request.AddParameter("application/json", "{\n \"hash\": \"$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW\",\n \"text\": \"hello\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);POST /v1/verify-bcrypt in Go (NewRequest)
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt"
payload := strings.NewReader("{\n \"hash\": \"$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW\",\n \"text\": \"hello\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("X-API-Key", "YOUR_API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}POST /v1/verify-bcrypt in Ruby (net::http)
require 'uri'
require 'net/http'
url = URI("https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["X-API-Key"] = 'YOUR_API_KEY'
request.body = "{\n \"hash\": \"$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW\",\n \"text\": \"hello\"\n}"
response = http.request(request)
puts response.read_bodyPOST /v1/verify-bcrypt in Swift (NSURLSession)
import Foundation
let headers = [
"Content-Type": "application/json",
"Accept": "application/json",
"X-API-Key": "YOUR_API_KEY"
]
let parameters = [
"hash": "$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW",
"text": "hello"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()POST /v1/verify-bcrypt in Objective-C (NSURLSession)
#import <Foundation/Foundation.h>
NSDictionary *headers = @{ @"Content-Type": @"application/json",
@"Accept": @"application/json",
@"X-API-Key": @"YOUR_API_KEY" };
NSDictionary *parameters = @{ @"hash": @"$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW",
@"text": @"hello" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];POST /v1/verify-bcrypt in Kotlin (OkHttp)
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"hash\": \"$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW\",\n \"text\": \"hello\"\n}")
val request = Request.Builder()
.url("https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt")
.post(body)
.addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("X-API-Key", "YOUR_API_KEY")
.build()
val response = client.newCall(request).execute()POST /v1/verify-bcrypt in C (libcurl)
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Content-Type: application/json");
headers = curl_slist_append(headers, "Accept: application/json");
headers = curl_slist_append(headers, "X-API-Key: YOUR_API_KEY");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"hash\": \"$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW\",\n \"text\": \"hello\"\n}");
CURLcode ret = curl_easy_perform(hnd);POST /v1/verify-bcrypt in Clojure (clj-http)
(require '[clj-http.client :as client])
(client/post "https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt" {:headers {:X-API-Key "YOUR_API_KEY"}
:content-type :json
:form-params {:hash "$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW"
:text "hello"}
:accept :json})POST /v1/verify-bcrypt in OCaml (CoHTTP)
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt" in
let headers = Header.add_list (Header.init ()) [
("Content-Type", "application/json");
("Accept", "application/json");
("X-API-Key", "YOUR_API_KEY");
] in
let body = Cohttp_lwt_body.of_string "{\n \"hash\": \"$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW\",\n \"text\": \"hello\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)POST /v1/verify-bcrypt in R (httr)
library(httr)
url <- "https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt"
payload <- "{\n \"hash\": \"$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW\",\n \"text\": \"hello\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('X-API-Key' = 'YOUR_API_KEY'), content_type("application/json"), accept("application/json"), encode = encode)
content(response, "text")POST /v1/verify-bcrypt in PowerShell (Invoke-WebRequest)
$headers=@{}
$headers.Add("Content-Type", "application/json")
$headers.Add("Accept", "application/json")
$headers.Add("X-API-Key", "YOUR_API_KEY")
$response = Invoke-WebRequest -Uri 'https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"hash": "$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW",
"text": "hello"
}'POST /v1/verify-bcrypt in PowerShell (Invoke-RestMethod)
$headers=@{}
$headers.Add("Content-Type", "application/json")
$headers.Add("Accept", "application/json")
$headers.Add("X-API-Key", "YOUR_API_KEY")
$response = Invoke-RestMethod -Uri 'https://password-security-toolkit.p.apihiver.com/v1/verify-bcrypt' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"hash": "$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW",
"text": "hello"
}'POST /v1/verify-bcrypt in HTTP (HTTP/1.1)
POST /v1/verify-bcrypt HTTP/1.1
Content-Type: application/json
Accept: application/json
X-Api-Key: YOUR_API_KEY
Host: password-security-toolkit.p.apihiver.com
Content-Length: 95
{
"hash": "$2b$04$0t0mY1uO0x3dZ5l0d7mJ1uJ0rE6s1XqfKxv8Qy7Jg2n7Qm0cJk3yW",
"text": "hello"
}Example response (200, application/json)
Success.
1{
2 "match": false
3}Errors
- 400 — A required parameter is missing or a value has the wrong format.
1{ 2 "error": { 3 "code": "INVALID_INPUT", 4 "message": "text: Field required" 5 } 6}
Gateway errors (missing key, no subscription, rate limits) are listed in Error codes.
Other Password Security API endpoints
- POSTScore a password's strength (0–4) with crack-time estimates and advice
- POSTHas this password appeared in known data breaches?
- GETGenerate strong random passwords
- POSTHash text (MD5/SHA/BLAKE2/bcrypt)
Password Security API pricing →·Password Security API overview →