stream

package
v0.0.0-...-aceaf87 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	NonceOverhead    = 4 + 1 // [ 4 bytes counter ] [ 1 byte tag ]
	DefaultBlockSize = 64 * 1024
	EOS              = 0x01

	ErrStreamInit = Error("STREAM initialization error")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error string

NEED CONST ERRORS

func (Error) Error

func (e Error) Error() string

type STREAM

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

func NewReader

func NewReader(r io.Reader, a cipher.AEAD, seed, ad []byte, blockSize int) (*STREAM, error)

THE NEW STREAM READER

func NewWriter

func NewWriter(w io.Writer, a cipher.AEAD, seed, ad []byte, blockSize int) (*STREAM, error)

THE NEW STREAM WRITER

func (*STREAM) Block

func (s *STREAM) Block() uint32

func (*STREAM) BlockSize

func (s *STREAM) BlockSize() int

func (*STREAM) Close

func (s *STREAM) Close() error

func (*STREAM) IsComplete

func (s *STREAM) IsComplete() bool

func (*STREAM) Read

func (s *STREAM) Read(p []byte) (n int, err error)

func (*STREAM) SeekBlock

func (s *STREAM) SeekBlock(block int)

func (*STREAM) StreamSize

func (s *STREAM) StreamSize(len int) int

try to predict the output size

func (*STREAM) Write

func (s *STREAM) Write(b []byte) (n int, err error)

Jump to

Keyboard shortcuts

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