digest

package
v0.0.0-...-e14225d Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: Unlicense Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const SEPARATOR_BINARY = " *"
View Source
const SEPARATOR_TEXT = "  "

Variables

This section is empty.

Functions

func Save

func Save(digest Digest, digestFile string) error

Types

type Calculator

type Calculator func(
	rootPath string,
	algorithm HashType) Digest

type Digest

type Digest struct {
	Location  common.Location
	Algorithm HashType
	Entries   *FileHashes
}

func Calculate

func Calculate(
	rootPath string,
	algorithm HashType) Digest

func Load

func Load(digestPath, digestFile string) (Digest, error)

func NewDigest

func NewDigest(
	digestPath string,
	digestTime time.Time) Digest

func (*Digest) AddFileHash

func (digest *Digest) AddFileHash(file, hash string)

type FileHashes

type FileHashes map[string]string

type HashType

type HashType int32
const (
	Unknown HashType = iota
	SHA256
	SHA512
)

type Reader

type Reader func(digestRootPath, digestFile string) (Digest, error)

type Writer

type Writer func(digest Digest, digestFile string) error

Jump to

Keyboard shortcuts

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