secure

package
Version: v0.0.0-...-06b391b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service contains password related methods

func New

func New(minStr int) *Service

New creates new password service

func (*Service) Hash

func (s *Service) Hash(password string) string

Hash hashes the password using bcrypt

func (*Service) MatchesHash

func (s *Service) MatchesHash(hash, password string) bool

MatchesHash checks whether hash matches with password. Returns true if hash and password match.

func (*Service) Password

func (s *Service) Password(pw string, inputs ...string) bool

Password checks whether password is secure enough using zxcvbn library

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL