gitea: Index | Files

package password

import ""


Package Files

password.go pwn.go

func BuildComplexityError Uses

func BuildComplexityError(ctx *context.Context) string

BuildComplexityError builds the error message when password complexity checks fail

func Generate Uses

func Generate(n int) (string, error)

Generate a random password

func IsComplexEnough Uses

func IsComplexEnough(pwd string) bool

IsComplexEnough return True if password meets complexity settings

func IsPwned Uses

func IsPwned(ctx context.Context, password string) (bool, error)

IsPwned checks whether a password has been pwned NOTE: This func returns true if it encounters an error under the assumption that you ALWAYS want to check against HIBP, so not getting a response should block a password until it can be verified.

func NewComplexity Uses

func NewComplexity()

NewComplexity for preparation

Package password imports 9 packages (graph) and is imported by 19 packages. Updated 2020-10-16. Refresh now. Tools for package owners.