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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(i int) int

func Chunk

func Chunk() int

func ClientDecode

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

func ClientEncode

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

func SH256L

func SH256L(b []byte) []byte

func SH256S

func SH256S(b []byte) []byte

func XORBytes

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

Types

type EncStreamClient

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

func NewEncStreamClient

func NewEncStreamClient(conn net.Conn, keys *Keyring) *EncStreamClient

func (*EncStreamClient) Close

func (e *EncStreamClient) Close() error

func (*EncStreamClient) Drop

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

func (*EncStreamClient) Read

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

func (*EncStreamClient) Write

func (e *EncStreamClient) 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