encrypt

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TsRng int = 300
)

Variables

This section is empty.

Functions

func Abs

func Abs(i int) int

func Chunk

func Chunk() int

func SH256L

func SH256L(b []byte) []byte

func SH256S

func SH256S(b []byte) []byte

func ServerDecode

func ServerDecode(b []byte, keys *Keyring) (int, bool)

func ServerEncode

func ServerEncode(i int, keys *Keyring) []byte

func XORBytes

func XORBytes(a, b []byte) []byte

Types

type EncStreamServer

type EncStreamServer struct {
	net.Conn
	// contains filtered or unexported fields
}

func NewEncStreamServer

func NewEncStreamServer(conn net.Conn, keys *Keyring) *EncStreamServer

func (*EncStreamServer) Close

func (e *EncStreamServer) Close() error

func (*EncStreamServer) Drop

func (e *EncStreamServer) Drop() (int, error)

func (*EncStreamServer) Read

func (e *EncStreamServer) Read(b []byte) (int, error)

func (*EncStreamServer) Write

func (e *EncStreamServer) Write(b []byte) (int, error)

type Keyring

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

func NewKeyring

func NewKeyring(s string) *Keyring

Jump to

Keyboard shortcuts

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