go-hibp/README.md

762 B

go-hibp - Simple go client for the HIBP API

Go Reference Go Report Card Build Status

Usage

Pwned Passwords API

package main

import (
	"fmt"
	"github.com/wneessen/go-hibp"
)

func main() {
	hc := New()
	m, _, err := hc.PwnedPassword.CheckPassword("test123")
	if err != nil {
		panic(err)
	}
	if m != nil && m.Count != 0 {
		fmt.Println("Your password was found in the pwned passwords DB")
    }
}