aes

package
v0.0.0-...-07ef6c8 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: Artistic-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(crypted, key []byte, iv []byte, unPaddingFunc func([]byte) []byte) ([]byte, error)

func AesDecryptPkcs5

func AesDecryptPkcs5(crypted []byte, key []byte, iv []byte) ([]byte, error)

func AesDecryptPkcs7

func AesDecryptPkcs7(crypted []byte, key []byte, iv []byte) ([]byte, error)

func AesDecryptSimple

func AesDecryptSimple(crypted []byte, key string, iv string) ([]byte, error)

解密

func AesEncrypt

func AesEncrypt(origData []byte, key []byte, iv []byte, paddingFunc func([]byte, int) []byte) ([]byte, error)

func AesEncryptPkcs5

func AesEncryptPkcs5(origData []byte, key []byte, iv []byte) ([]byte, error)

func AesEncryptPkcs7

func AesEncryptPkcs7(origData []byte, key []byte, iv []byte) ([]byte, error)

func AesEncryptSimple

func AesEncryptSimple(origData []byte, key string, iv string) ([]byte, error)

func PKCS5Padding

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

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func PKCS7Padding

func PKCS7Padding(ciphertext []byte, blockSize int) []byte

PKCS7 填充模式

func PKCS7UnPadding

func PKCS7UnPadding(origData []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