aes

package
v0.0.0-...-04eba25 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(mode Mode, key []byte, data []byte) ([]byte, error)

func Encrypt

func Encrypt(mode Mode, key []byte, data []byte) ([]byte, error)

func GenerateAESKey

func GenerateAESKey(size Type) ([]byte, error)

func GenerateAESKeyFromBytes

func GenerateAESKeyFromBytes(bytes []byte, size Type) ([]byte, error)

func GenerateAESKeyFromString

func GenerateAESKeyFromString(str string, size Type) ([]byte, error)

Types

type Mode

type Mode = int8
const (
	ModeCBC Mode = iota
	ModeCFB
	ModeOFB
	ModeCTR
)

type Type

type Type = int8
const (
	TypeInvalid      = -1
	Type128     Type = iota
	Type192
	Type256
)

Jump to

Keyboard shortcuts

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