xaes

package
v0.2.22 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package xaes provides useful functions for AES encryption/decryption algorithms, only CBC mode is supported.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

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

Decrypt decrypts the cipher text in CBC mode, using the default iv value. Note that the key must be 16/24/32 bit length.

func DecryptWithIV

func DecryptWithIV(encrypted []byte, key []byte, iv []byte) ([]byte, error)

DecryptWithIV decrypts cipher text with CBC mode. Note that the key must be 16/24/32 bit length.

func Encrypt

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

Encrypt encrypts plain text with CBC mode, using the default iv value. Note that the key must be 16/24/32 bit length.

func EncryptWithIV

func EncryptWithIV(plain []byte, key []byte, iv []byte) ([]byte, error)

EncryptWithIV encrypts plain text with CBC mode. Note that the key must be 16/24/32 bit length.

Types

This section is empty.

Jump to

Keyboard shortcuts

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