sec

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComparePasswordBytes

func ComparePasswordBytes(byteHash []byte, plainPwdBytes []byte) (bool, error)

ComparePasswordBytes compares hash with password

func ComparePasswords

func ComparePasswords(hashedPwd string, plainPwd string) (bool, error)

ComparePasswords compares hash with password

It is named this way for compatibility with my old projects

func GenerateRandomString

func GenerateRandomString(n int) (string, error)

GenerateRandomString uses digits and english letters to generate cryptographically secure random string

func GenerateRandomStringFromSet

func GenerateRandomStringFromSet(n int, charSet []byte) (string, error)

GenerateRandomStringFromSet uses provided set of characters to generate cryptographically secure random string

func HashAndSaltPassword

func HashAndSaltPassword(pwd []byte) (string, error)

func HashAndSaltPasswordString

func HashAndSaltPasswordString(pwd string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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