crypto

package
v0.3.12 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrApiSecretEnvVarNotSet = errors.New("FOREST_API_SECRET environment variable is not set")
)

Functions

func Decrypt

func Decrypt(secret string, datas ...*string)

Decrypt 数据解密

func DecryptBytes

func DecryptBytes(secret []byte, datas ...*[]byte)

DecryptBytes 数据解密

func Encrypt

func Encrypt(secret string, datas ...*string)

Encrypt 数据加密

func EncryptBody

func EncryptBody(body interface{}) ([]byte, error)

func EncryptBytes

func EncryptBytes(secret []byte, datas ...*[]byte)

EncryptBytes 数据加密

func GenSecret

func GenSecret(sizes ...uint) string

GenSecret 生成随机密钥

Types

This section is empty.

Jump to

Keyboard shortcuts

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