aes

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DATAEND byte = '\n' //数据尾帧标识符 (防止粘包)
)

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(text string) ([]byte, error)

func AesDecryptStruct

func AesDecryptStruct(destStruct any, text string) error

func AesEncrypt

func AesEncrypt(text []byte) (encrypt []byte, err error)

func AesEncryptStruct

func AesEncryptStruct(s any) (encrypt []byte, err error)

func SetIv

func SetIv(s string)

func SetKey

func SetKey(s string)

Types

type IO

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

func NewIOWrapper

func NewIOWrapper(rwc io.ReadWriteCloser) *IO

func NewReadWrapper added in v1.0.14

func NewReadWrapper(r io.Reader) *IO

func NewWriteWrapper added in v1.0.14

func NewWriteWrapper(w io.Writer) *IO

func (*IO) Close

func (i *IO) Close() error

func (*IO) Read

func (i *IO) Read(p []byte) (n int, err error)

func (*IO) Write

func (i *IO) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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