No description
Find a file
2021-09-21 11:21:04 +02:00
.idea Initial checkin 2021-09-19 18:10:12 +02:00
.gitignore Initial commit 2021-09-19 17:58:02 +02:00
go.mod Initial checkin 2021-09-19 18:10:12 +02:00
hibp.go v0.1.1: Complete refactor 2021-09-21 11:21:04 +02:00
hibp_test.go v0.1.1: Complete refactor 2021-09-21 11:21:04 +02:00
LICENSE Initial commit 2021-09-19 17:58:02 +02:00
password.go v0.1.1: Complete refactor 2021-09-21 11:21:04 +02:00
password_test.go v0.1.1: Complete refactor 2021-09-21 11:21:04 +02:00
README.md v0.1.1: Complete refactor 2021-09-21 11:21:04 +02:00

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")
    }
}