aes

package
v1.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(crypted, key []byte) []byte

func AesDecrypt7

func AesDecrypt7(crypted, key []byte) []byte

func AesEncrypt

func AesEncrypt(src, key string) []byte

func AesEncrypt7

func AesEncrypt7(src, key string) []byte

func CbcDecrypt

func CbcDecrypt(src, key, iv []byte) (strDesc string, err error)

解密字符串

func Decrypt

func Decrypt(ciphertext, key []byte) ([]byte, error)

func Encrypt

func Encrypt(plantText, key []byte) ([]byte, error)

aes加密算法,CBC , pkcs7

func NewECBDecrypter

func NewECBDecrypter(b cipher.Block) cipher.BlockMode

NewECBDecrypter returns a BlockMode which decrypts in electronic code book mode, using the given Block.

func NewECBEncrypter

func NewECBEncrypter(b cipher.Block) cipher.BlockMode

NewECBEncrypter returns a BlockMode which encrypts in electronic code book mode, using the given Block.

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

func PKCS7UnPadding

func PKCS7UnPadding(plantText []byte, blockSize int) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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