aead

package
Version: v0.0.0-...-7e11129 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cipher

type Cipher struct {
	net.Conn

	Method string

	Enc cipher.AEAD
	Dec cipher.AEAD

	Info *cipherInfo
	// contains filtered or unexported fields
}

Cipher cipher

func NewCipher

func NewCipher(method string) *Cipher

NewCipher create aead cipher

func (*Cipher) Init

func (c *Cipher) Init(key []byte, conn net.Conn)

Init set key and conn

func (*Cipher) KeySize

func (c *Cipher) KeySize() int

KeySize return key size

func (*Cipher) Read

func (c *Cipher) Read(p []byte) (n int, err error)

Read read from client

func (*Cipher) Write

func (c *Cipher) Write(p []byte) (n int, err error)

Write write to client

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL