aead

package
v0.0.0-...-d00ae73 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DataMaxSize = 0x3FFF
View Source
const MAX_PACKET_SIZE = 65507

Variables

View Source
var ErrShortPacket = errors.New("short packet")

Functions

func GetAEADCiphers

func GetAEADCiphers() map[string]IAEADCipher

func GetAEADConnCipher

func GetAEADConnCipher(method string) func(string, net.Conn) (net.Conn, error)

func GetAEADPacketCiphers

func GetAEADPacketCiphers(method string) func(string, net.PacketConn) (net.PacketConn, error)

func MD5

func MD5(data []byte) []byte

Types

type IAEADCipher

type IAEADCipher interface {
	KeySize() int
	SaltSize() int
	NonceSize() int
	NewAEAD(key []byte, salt []byte, decryptOrEncrypt int) (cipher.AEAD, error)
}

func GetAEADCipher

func GetAEADCipher(method string) IAEADCipher

Jump to

Keyboard shortcuts

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