encode

package
v0.0.0-...-2946602 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const JWT_SECRETE = "p2F*J7D!A%s68^wS"

Variables

This section is empty.

Functions

func AESCBCDecrypted

func AESCBCDecrypted(ciphertext, key string) (string, error)

AESCBCDecrypted

AES  CBC 解码
key:解密key
ciphertext:加密返回的串
plaintext:解密后的字符串

func AESCBCEncrypt

func AESCBCEncrypt(plaintext, key string) (string, error)

AESCBCEncrypt

AES  CBC 加密
key:加密key
plaintext:加密明文
ciphertext:解密返回字节字符串[ 整型以十六进制方式显示]

func AESGCMDecrypted

func AESGCMDecrypted(ciphertext, key, nonceText string) (string, error)

AESGCMDecrypted

AES  GCM 解码
key:解密key
ciphertext:加密返回的串
plaintext:解密后的字符串

func AESGCMEncrypt

func AESGCMEncrypt(plaintext, key string) (string, string, error)

AESGCMEncrypt

AES  GCM 加密
key:加密key
plaintext:加密明文
ciphertext:解密返回字节字符串[ 整型以十六进制方式显示]

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 EncryptByAes

func EncryptByAes(text string) (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