checksum

package
v0.0.0-...-73e628f Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Compute and check SHA256/SHA512 message digest

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SHA256

type SHA256 struct {
	// contains filtered or unexported fields
}

func Data256

func Data256(data []byte) SHA256

Data256 returns the SHA256 checksum of data.

func File256

func File256(path string) (SHA256, error)

Path256 returns the SHA256 checksum of the file in path. Uses io.Copy() to be usable on large files.

func (SHA256) Bytes

func (s SHA256) Bytes() []byte

func (SHA256) String

func (s SHA256) String() string

type SHA512

type SHA512 struct {
	// contains filtered or unexported fields
}

func Data512

func Data512(data []byte) SHA512

Data512 returns the SHA512 checksum of data.

func Path512

func Path512(path string) (SHA512, error)

Path512 returns the SHA512 checksum of the file in path.

func (SHA512) Bytes

func (s SHA512) Bytes() []byte

func (SHA512) String

func (s SHA512) String() string

Jump to

Keyboard shortcuts

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