hash

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hasher

type Hasher interface {

	// Object returns the hash of a given object
	Object(obj interface{}) (string, error)

	// File returns the hash of a given file on disk
	File(path string) (string, error)

	// String returns the hash of a given string
	String(s string) (string, error)
}

Hasher is an interface for hashing objects, files, or strings. Different implementations may exist for SHA1, SHA256, etc.

func SHA1

func SHA1() Hasher

func SHA256

func SHA256() Hasher

Jump to

Keyboard shortcuts

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