boxstream

package
v0.0.0-...-4d4f4d6 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2016 License: GPL-3.0 Imports: 5 Imported by: 1

README

boxstream

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

Documentation

Overview

This file is part of secretstream.

secretstream is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

secretstream is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with secretstream. If not, see <http://www.gnu.org/licenses/>.

This file is part of secretstream.

secretstream is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

secretstream is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with secretstream. If not, see <http://www.gnu.org/licenses/>.

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