crypto

package
v0.0.0-...-a4b8c5e Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEncrypt      = errors.New("encrypt Error:")
	ErrDecrypt      = errors.New("decrypt Error:")
	ErrTextIsShort  = errors.New("text/key too short or long!")
	ErrHashNotMatch = errors.New("hash not match")
)

Functions

func Decrypt

func Decrypt(key, text string) (string, error)

func Encrypt

func Encrypt(key, text string) (string, error)

func HashSha256

func HashSha256(v string) string

func IsOkHash

func IsOkHash(s string, hash string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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