stream

package
v1.0.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2019 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package stream implements a variant of the STREAM chunked encryption scheme.

Index

Constants

View Source
const ChunkSize = 64 * 1024

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

func NewReader

func NewReader(key []byte, src io.Reader) (*Reader, error)

func (*Reader) Read

func (r *Reader) Read(p []byte) (int, error)

type Writer

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

func NewWriter

func NewWriter(key []byte, dst io.WriteCloser) (*Writer, error)

func (*Writer) Close

func (w *Writer) Close() error

Close will flush the last chunk and call the underlying WriteCloser's Close method.

func (*Writer) Write

func (w *Writer) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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