digest

package
v4.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Algorithm

type Algorithm int

Algorithm describes the digest algorithm

const (

	// SHA256 is the sha256 algorithm
	SHA256 Algorithm
	// SHA384 is the sha384 algorithm
	SHA384

	GitObjectID
)

func (Algorithm) String

func (t Algorithm) String() string

String returns the textual representation

type Digest

type Digest struct {
	Sum       []byte
	Algorithm Algorithm
}

Digest contains a checksum

func FromStrDigest

func FromStrDigest(digest string, algo Algorithm) (*Digest, error)

func FromString

func FromString(in string) (*Digest, error)

FromString converts a "<Algorithm>:<hash> string to Digest

func (*Digest) String

func (d *Digest) String() string

String returns '<Algorithm>:<hash>'

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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