secret

package
v0.0.0-...-4cafcdf Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PwdKey = []byte("hhs1%h3&h9**6jj*")

16,24,32位字符串的话,分别对应AES-128,AES-192,AES-256 加密方法 key不能泄露

Functions

func AesDecrypt

func AesDecrypt(data []byte, key []byte) ([]byte, error)

AesDecrypt 解密

func AesEncrypt

func AesEncrypt(data []byte, key []byte) ([]byte, error)

AesEncrypt 加密

func DecryptByAes

func DecryptByAes(data string, key []byte) ([]byte, error)

DecryptByAes base64解码后 Aes 解密

func EncryptByAes

func EncryptByAes(data []byte, key []byte) (string, error)

EncryptByAes Aes加密 后 base64

Types

This section is empty.

Jump to

Keyboard shortcuts

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