boxstream

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2018 License: GPL-3.0 Imports: 6 Imported by: 1

README

boxstream

This package implements pull-box-stream in Go (without the pull).

Documentation

Index

Constants

View Source
const (
	// HeaderLength defines the length of the header packet before the body
	HeaderLength = 2 + 16 + 16

	// MaxSegmentSize is the maximum body size for boxstream packets
	MaxSegmentSize = 4 * 1024
)

Variables

This section is empty.

Functions

func NewBoxer

func NewBoxer(w io.Writer, nonce *[24]byte, secret *[32]byte) io.WriteCloser

NewBoxer returns a Boxer wich encrypts everything that is written to the passed writer

func NewUnboxer

func NewUnboxer(input io.Reader, nonce *[24]byte, secret *[32]byte) io.Reader

NewUnboxer wraps the passed input Reader into an Unboxer

Types

type Boxer

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

Boxer encrypts everything that is written to it

type Unboxer

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

Unboxer decrypts everything that is read from it

Jump to

Keyboard shortcuts

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