checksums

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(args []string) error

func RunMD5

func RunMD5(args []string) error

func RunSHA1

func RunSHA1(args []string) error

func RunSHA256

func RunSHA256(args []string) error

Types

type ChecksumError

type ChecksumError struct {
	XMLName xml.Name `xml:"error"`
	Code    int      `xml:"code,attr"`
	Msg     string   `xml:"msg,attr"`
	Path    string   `xml:"path,attr"`
}

type ChecksumFile

type ChecksumFile struct {
	XMLName   xml.Name `xml:"file"`
	Path      string   `xml:"path,attr"`
	Absolute  string   `xml:"absolute,attr"`
	SizeBytes int64    `xml:"size_bytes,attr"`
	MD5       string   `xml:"md5,attr"`
	SHA1      string   `xml:"sha1,attr"`
	SHA256    string   `xml:"sha256,attr"`
}

type ChecksumResult

type ChecksumResult struct {
	XMLName   xml.Name        `xml:"checksums"`
	Timestamp int64           `xml:"timestamp,attr"`
	Files     []ChecksumFile  `xml:"file,omitempty"`
	Errors    []ChecksumError `xml:"error,omitempty"`
}

type Config

type Config struct {
	Algorithms []string `flag:"" desc:"Hash algorithm (md5, sha1, sha256)"`
	Verify     bool     `flag:"" desc:"Verify checksums from file"`
	XML        bool
	JSON       bool
	Plain      bool
	Pretty     bool
}

Jump to

Keyboard shortcuts

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