sha256

package
v0.196.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SHA256

type SHA256 [sha256.Size]byte

SHA256 is a type-safe wrapper around a SHA256 hash.

func FromBytes

func FromBytes(data []byte) SHA256

FromBytes converts a SHA256 in []byte form to a SHA256.

func MustParseSHA256

func MustParseSHA256(s string) SHA256

MustParseSHA256 parses a hex-ecndoded SHA256 hash from a string, panicing on error.

func ParseSHA256

func ParseSHA256(s string) (SHA256, error)

ParseSHA256 parses a hex-ecndoded SHA256 hash from a string.

func Sum

func Sum(data []byte) SHA256

Sum "data" and return the SHA256 hash.

func SumFile

func SumFile(path string) (SHA256, error)

func SumReader

func SumReader(r io.Reader) (SHA256, error)

SumReader "r" and return the SHA256 hash.

func (SHA256) GoString

func (s SHA256) GoString() string

func (SHA256) MarshalText

func (s SHA256) MarshalText() ([]byte, error)

func (SHA256) String

func (s SHA256) String() string

func (*SHA256) UnmarshalText

func (s *SHA256) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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