crypte

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyLengthMax        = errors.New("key length cannot exceed 32")
	ErrKeyLengthEmpty      = errors.New("key length cannot be empty")
	ErrPaddingSize         = errors.New("padding size error please check the secret key or iv")
	ErrInvalidBlockSize    = errors.New("invalid blocksize")
	ErrInvalidPKCS7Data    = errors.New("invalid PKCS7 data (empty or not padded)")
	ErrInvalidPKCS7Padding = errors.New("invalid padding on input")
)

Functions

func AesCbcDecrypt

func AesCbcDecrypt(cipherText, secretKey []byte) (plainText []byte, err error)

aes decrypt

func AesCbcEncrypt

func AesCbcEncrypt(plainText, secretKey []byte) (cipherText []byte, err error)

aes encrypt

Types

This section is empty.

Jump to

Keyboard shortcuts

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