aescbc

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoKeyProvided        = errors.New("no key")
	ErrIVNotBlockSize       = errors.New("IV length does not match AES block size")
	ErrNotMultipleBlockSize = errors.New("ciphertext length is not a multiple of the AES block size")
)

Functions

func Decrypt

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

Decrypt decrypts the ciphertext with the key and IV. The IV length must be equal to the block size.

This function mutates the ciphertext.

func Encrypt

func Encrypt(key, iv, plaintext []byte) ([]byte, error)

Encrypt encrypts the plaintext with the key and IV. The IV length must be equal to the AES block size.

This function might mutate the plaintext.

Types

This section is empty.

Jump to

Keyboard shortcuts

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