aes

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PwdKey = []byte("ABCDABCDABCDABCD")

PwdKey 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) ([]byte, error)

DecryptByAes Aes 解密

func DecryptByAesWithKey

func DecryptByAesWithKey(data string, pwd string) (string, error)

DecryptByAesWithKey Aes 解密

func EncryptByAes

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

EncryptByAes Aes加密 后 base64 再加

func EncryptByAesWithKey

func EncryptByAesWithKey(data string, pwd string) (string, error)

EncryptByAesWithKey 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