hash

package
v0.0.0-...-a67b36e Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

CheckPasswordHash compares a given password with one from the database Wraps the bcrypt.CompareHashAndPassword func to avoid code duplication and cleaner code

func FromPassword

func FromPassword(password []byte) (string, error)

FromPassword hashes the user's password before routed to other services (user-service) Only wraps the bcrypt.GenerateFromPassword func avoiding code duplication and a central point to change the cost of the hashing

Types

type Sha256

type Sha256 []byte

func (Sha256) Hash

func (sha Sha256) Hash() []byte

func (Sha256) String

func (sha Sha256) String() string

Jump to

Keyboard shortcuts

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