SecurePasswd_MGMT 2026.03.19
A modern, cross-platform password manager and two-factor authenticator (TOTP) designed with state-of-the-art security.
Loading...
Searching...
No Matches
pwned_check.c File Reference
#include "pwned_check.h"
#include <openssl/evp.h>
#include <openssl/sha.h>
#include <curl/curl.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
Include dependency graph for pwned_check.c:

Classes

struct  MemoryStruct

Functions

static size_t write_callback (const void *contents, size_t size, size_t nmemb, void *userp)
int is_password_pwned (const char *password)
 Checks if a password has been pwned using the HIBP k-anonymity API.

Function Documentation

◆ is_password_pwned()

int is_password_pwned ( const char * password)

Checks if a password has been pwned using the HIBP k-anonymity API.

Parameters
passwordThe password to check.
Returns
The number of times the password has been pwned (0 if not found), or -1 on network/API error.

◆ write_callback()

size_t write_callback ( const void * contents,
size_t size,
size_t nmemb,
void * userp )
static