aesCbcPkcs7Kit

package
v3.0.13 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(data []byte, key []byte, iv []byte) ([]byte, error)

Decrypt AES/CBC/PKCS7 解密.

func DecryptFromBase64

func DecryptFromBase64(base64Str string, key []byte, iv []byte) ([]byte, error)

func DecryptFromHex

func DecryptFromHex(hexStr string, key []byte, iv []byte) ([]byte, error)

func Encrypt

func Encrypt(data []byte, key []byte, iv []byte) ([]byte, error)

Encrypt AES/CBC/PKCS7 加密.

PS: 返回值转换为字符串,可以考虑使用: base64.StdEncoding.EncodeToString().

func EncryptToBase64

func EncryptToBase64(data []byte, key []byte, iv []byte) (string, error)

EncryptToBase64 PS: 标准的base64.

func EncryptToHex

func EncryptToHex(data []byte, key []byte, iv []byte) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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