crypto

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

Reader is an io.Reader that can read encrypted bytes. Now it only supports aes-128-cfb.

func NewReader

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

NewReader returns a new Reader that decrypts bytes from r

func (*Reader) Read

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

Read satisfies the io.Reader interface.

type Writer

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

Writer is an io.Writer that can write encrypted bytes. Now it only support aes-128-cfb.

func NewWriter

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

NewWriter returns a new Writer that encrypts bytes to w.

func (*Writer) Write

func (w *Writer) Write(p []byte) (nRet int, errRet error)

Write satisfies the io.Writer interface.

Jump to

Keyboard shortcuts

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