sycrypt

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: MIT Imports: 4 Imported by: 0

README

sycrypt

Golang dynamic salt encryption library for passwords.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CryptPassword

func CryptPassword(password string) string

func DecryptPassword

func DecryptPassword(decryptedPassword, secretKey string) string

func DynamicSaltAndHashPassword

func DynamicSaltAndHashPassword(password string) (string, string)

Salt password with a dynamic length salt and hash it and return hash with salt

func DynamicSaltPassword

func DynamicSaltPassword(password string) (string, string)

Salt password with a dynamic length salt and return salted password with salt

func EncryptPassword

func EncryptPassword(password, secretKey string) string

func HashPassword

func HashPassword(pwd string) string

Hash password and return with the value

func RandomString

func RandomString(n int) string

RandomString returns a random string with the length of n

func SaltAndHashPassword

func SaltAndHashPassword(password, salt string) string

Salt password and hash it and return with the value

func SaltPassword

func SaltPassword(password, salt string) string

Salt password with the salt and return with the value

func StaticSaltAndHashPassword

func StaticSaltAndHashPassword(password string, saltLength int) (string, string)

Salt password with a fixed length salt and hash it and return hash with salt

func StaticSaltPassword

func StaticSaltPassword(password string, saltLength int) (string, string)

Salt password with a fixed length salt and return salted password with salt

func VerifyHash2Hash

func VerifyHash2Hash(hash, hashedPassword string) bool

Verify hashed password with the hash

func VerifyPassword2Hash

func VerifyPassword2Hash(hash, password, salt string) bool

Verify password with the hash

func VerifySaltedPassword2Hash

func VerifySaltedPassword2Hash(hash, saltedPassword string) bool

Verify salted password with the hash

Types

This section is empty.

Jump to

Keyboard shortcuts

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