vaes

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Pkcs5Padding = openssl.PKCS5_PADDING
	Pkcs7Padding = openssl.PKCS7_PADDING
	ZerosPadding = openssl.ZEROS_PADDING
)

Variables

This section is empty.

Functions

func DecryptCBC

func DecryptCBC(src, key, iv []byte, padding string) ([]byte, error)

DecryptCBC decrypts `cipherText` using CBC mode. Note that the key must be 16/24/32 bit length.

func DecryptECB

func DecryptECB(src, key []byte, padding string) ([]byte, error)

DecryptECB decrypts `cipherText` using ECB mode.

func DecryptGCM

func DecryptGCM(cipherText, key, iv []byte) ([]byte, error)

DecryptGCM decrypts `cipherText` using GCM mode.

func EncryptCBC

func EncryptCBC(src, key, iv []byte, padding string) ([]byte, error)

EncryptCBC encrypts `src` using CBC mode. Note that the key must be 16/24/32 bit length.

func EncryptECB

func EncryptECB(src, key []byte, padding string) ([]byte, error)

EncryptECB encrypts `src` using ECB mode.

func EncryptGCM

func EncryptGCM(plainText, key, iv []byte) ([]byte, error)

EncryptGCM encrypts `plainText` using GCM mode.

Types

This section is empty.

Jump to

Keyboard shortcuts

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