cfb8

package
v0.0.0-...-93368d4 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Based on crypto/cipher's StreamReader and StreamWriter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReadWriter

type ReadWriter struct {
	RW     io.ReadWriter
	Sr, Sw cipher.Stream
}

ReadWriter wraps a cipher.Stream into an io.Reader and io.Writer. It calls XORKeyStream to process each slice of data which passes through.

func New

func New(rw io.ReadWriter, secret []byte) *ReadWriter

func (ReadWriter) Read

func (b ReadWriter) Read(s []byte) (n int, err error)

func (ReadWriter) Write

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

Jump to

Keyboard shortcuts

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