aesengine

package module
v0.0.0-...-7827ba4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AESEngine

type AESEngine struct {
	Key []byte

	Nonce []byte
	// contains filtered or unexported fields
}

AESEngine is the AES encryption and decryption object. It has no exposed properties.

func New

func New() (cr AESEngine, err error)

New creates a new AESEngine instance

func NewWithKey

func NewWithKey(key []byte, nonce []byte) (cr AESEngine, err error)

NewWithKey creates a new AESEngine instance with pre-defined key and nonce

func (AESEngine) Decrypt

func (cr AESEngine) Decrypt(input []byte) (output []byte, err error)

Decrypt decrypts an AES-encrypted byte-array. The byte-array should contain both the nonce and encrypted content

func (AESEngine) Encrypt

func (cr AESEngine) Encrypt(input []byte) (output []byte)

Encrypt encrypts a byte-array

Jump to

Keyboard shortcuts

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