secure

package
v0.0.0-...-faa3d42 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL