passwd

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 1 Imported by: 0

README

passwd

version licence codecov coverage Tests passing Go Reference Go Report Card Maintainability

A very simple library for your passwords

How to use?
hash, err := passwd.Hash("myverystrongpassword123!")
if err != nil {
    return err
}

result := passwd.Check("myverystrongpassword123!", hash)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(pwd, hash string) bool

CheckPasswordHash takes password and hash. Returns true if it matches, flase otherwise

func Hash

func Hash(pwd string) (string, error)

Hash takes password and returnes hash based on it

func HashWithCost

func HashWithCost(pwd string, cost int) (string, error)

HashWithCost takes password and returnes hash based on it with cost as provided

Types

This section is empty.

Jump to

Keyboard shortcuts

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