gopass: github.com/justwatchcom/gopass/pkg/hibp/api Index | Examples | Files

package api

import "github.com/justwatchcom/gopass/pkg/hibp/api"

Package api implements an HIBP API client.

Code:

ctx := context.Background()
matches, err := Lookup(ctx, "sha1sum of secret")
if err != nil {
    panic(err)
}
fmt.Printf("Number of matches: %d", matches)

Index

Examples

Package Files

client.go

Variables

var URL = "https://api.pwnedpasswords.com"

URL is the HIBPv2 API URL

func Lookup Uses

func Lookup(ctx context.Context, shaSum string) (uint64, error)

Lookup performs a lookup against the HIBP v2 API

Package api imports 10 packages (graph) and is imported by 1 packages. Updated 2020-05-27. Refresh now. Tools for package owners.