aes

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCBCPKCS5Padding

func NewCBCPKCS5Padding() *cbcPKCS5Padding

NewCBCPKCS5Padding constructs an AES/CBC/PKCS5Padding encryption engine.

Types

type GCM

type GCM struct {
	// contains filtered or unexported fields
}

func NewGCM

func NewGCM() *GCM

NewGCM constructs an AES/GCM encryption engine.

func (*GCM) Decrypt

func (e *GCM) Decrypt(base64Key, base64CipherText string) (string, error)

Decrypt returns a decrypted string from AES/GCM base64 cipher text.

func (*GCM) Encrypt

func (e *GCM) Encrypt(base64Key, plainText string) (string, error)

Encrypt returns AES/GCM base64 cipher text. The key argument should be the base64 encoded AES key, either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256.

func (*GCM) SetRandReader added in v0.7.3

func (e *GCM) SetRandReader(randReader io.Reader)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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