aes

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(msg, key string) (string, error)

Decrypt will decrypt the msg using the provided key

func Encrypt

func Encrypt(msg, key string) (string, error)

Encrypt AES encrypts the msg using the provided key

func NewReader

func NewReader(base io.Reader, key string) (io.ReadCloser, error)

NewReader returns a new aes reader

func NewWriter

func NewWriter(base io.Writer, key string) (io.WriteCloser, error)

NewWriter returns a new aes writer

Types

type IOCoppler

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

IOCoppler copples reader, writer and closer

func NewIOCoppler

func NewIOCoppler(upper, lower interface{}) *IOCoppler

NewIOCoppler returns a new IOCoppler instance

func (*IOCoppler) Close

func (coppler *IOCoppler) Close() error

Close closes the upper layer first, then the lower layer

func (*IOCoppler) Read

func (coppler *IOCoppler) Read(data []byte) (int, error)

Read reads data from the upper layer

func (*IOCoppler) Write

func (coppler *IOCoppler) Write(data []byte) (int, error)

Write writes data to the upper layer

Jump to

Keyboard shortcuts

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