hash

package
v0.0.0-...-70ba537 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2020 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SHA256Size is the size of a SHA-256 hash.
	SHA256Size = sha256.Size
	// SHA512Size is the size of a SHA-512 hash.
	SHA512Size = sha512.Size
)

Variables

This section is empty.

Functions

func SHA256File

func SHA256File(filename string) (string, error)

SHA256File computes the SHA-256 hash of the file denoted by filename and returns it as a hex encoded string.

func SHA256Sum

func SHA256Sum(files []string, w io.Writer, bsdFormat bool) error

SHA256Sum computes the SHA-256 hash of all files and writes the result to w. If bsdFormat is true, output is shown in BSD-style. Linux-style otherwise.

func SHA512

func SHA512(buffer []byte) []byte

SHA512 computes the SHA-512 hash of the given buffer.

func SHA512File

func SHA512File(filename string) (string, error)

SHA512File computes the SHA-512 hash of the file denoted by filename and returns it as a hex encoded string.

func SHA512Sum

func SHA512Sum(files []string, w io.Writer, bsdFormat bool) error

SHA512Sum computes the SHA-512 hash of all files and writes the result to w. If bsdFormat is true, output is shown in BSD-style. Linux-style otherwise.

Types

This section is empty.

Jump to

Keyboard shortcuts

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