aes

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(cipherText []byte, key []byte, iv ...[]byte) ([]byte, error)

AES解密, 使用CBC模式,填充方式为PKCS5Padding,注意key必须为16/24/32位长度,iv初始化向量为非必需参数

func Encrypt

func Encrypt(plainText []byte, key []byte, iv ...[]byte) ([]byte, error)

AES加密, 使用CBC模式,注意key必须为16/24/32位长度,iv初始化向量为非必需参数

func PKCS5Padding

func PKCS5Padding(src []byte, blockSize int) []byte

func PKCS5UnPadding

func PKCS5UnPadding(src []byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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