dirhash

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultHash = sha256.New

DefaultHash is default DirHash hashing algorithm - "sha256".

Functions

This section is empty.

Types

type DirHash

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

DirHash is the struct for a tar hash calculation.

func New

func New(path string) *DirHash

New creates a new struct for calculating a fixed time checksum of a tar archive.

func NewHash

func NewHash(path string, newHash func() hash.Hash) *DirHash

NewHash creates a new struct for calculating a fixed time checksum of a tar archive, providing a Hash to use rather than the default one.

func (*DirHash) Sum

func (ds *DirHash) Sum(extra []byte) ([]byte, error)

Sum calculates the hash of directory.

Jump to

Keyboard shortcuts

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