crypto

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComparePasswords

func ComparePasswords(hashedPwd string, plainPwd string) bool

ComparePasswords verify if a given password (plainPwd) corresponds to the hashedPwd from User Database

func HashAndSalt

func HashAndSalt(plainPwd string) (string, error)

HashAndSalt calculates the salted hash for the given password

func Sha256Hash

func Sha256Hash(s string) string

Sha256Hash calculates the sha256 hash of a string

func ValidatePasswordHash

func ValidatePasswordHash(s string) bool

ValidatePasswordHash verifies that the given string is a valid password hash

Types

This section is empty.

Jump to

Keyboard shortcuts

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