file

package
v0.0.0-...-39e5c9c Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Algo

type Algo uint
const (
	MD4        Algo = 1 + iota // import golang.org/x/crypto/md4
	MD5                        // import crypto/md5
	SHA1                       // import crypto/sha1
	SHA224                     // import crypto/sha256
	SHA256                     // import crypto/sha256
	SHA384                     // import crypto/sha512
	SHA512                     // import crypto/sha512
	Sha512224                  // import crypto/sha512
	Sha512256                  // import crypto/sha512
	Blake2b256                 // import golang.org/x/crypto/blake2b
	Blake2b384                 // import golang.org/x/crypto/blake2b
	Blake2b512                 // import golang.org/x/crypto/blake2b
	XXHASH                     // import github.com/cespare/xxhash/v2
	IMOHASH                    // import github.com/kalafut/imohash
)

func (Algo) Sum

func (a Algo) Sum(data []byte) string

type CheckSum

type CheckSum struct {
	Ref  string
	Algo Algo
}

func NewSum

func NewSum(algo Algo, ref ...string) *CheckSum

func (*CheckSum) Check

func (c *CheckSum) Check(data []byte) bool

type File

type File struct {
	Src string
	Dst string
	Sum *CheckSum
}

func NewFile

func NewFile(src, dst string, algo Algo, ref ...string) *File

Jump to

Keyboard shortcuts

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