hasher

package
v0.0.0-...-fa676ed Latest Latest
Warning

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

Go to latest
Published: May 13, 2016 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const (
	RW_BUFFER = 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Index int
	Data  []byte
	Size  int
	Hash  []byte
}

type Hasher

type Hasher struct {
	FileInfo  os.FileInfo
	FilePath  string
	Mode      string
	BlockSize int
	Workers   int
	HashType  string
	FileSize  int64
	NumBlocks int

	Hashes chan Block
	// contains filtered or unexported fields
}

func New

func New(file_path string, mode string, bs int, hash_type string, workers int) (*Hasher, error)

func (*Hasher) Close

func (self *Hasher) Close()

func (*Hasher) HashRange

func (self *Hasher) HashRange() chan Block

func (*Hasher) Start

func (self *Hasher) Start()

func (*Hasher) Write

func (self *Hasher) Write(block Block)

Jump to

Keyboard shortcuts

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