hash

package
v0.0.0-...-68f58f5 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

A Git-oriented hashing implementation. Supports all hashing algorithms that Git does.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

type Hash [20]byte
var Zero Hash // All zeros, no need to initialize

func FromHex

func FromHex(hs string) (Hash, error)

func MustFromHex

func MustFromHex(hs string) Hash

MustFromHex is like FromHex but panics if the hex string is invalid. It is intended for use in tests and other situations where the hex string is known to be valid.

func (Hash) Is

func (h Hash) Is(other Hash) bool

func (Hash) String

func (h Hash) String() string

type Hasher

type Hasher struct {
	hash.Hash
}

Jump to

Keyboard shortcuts

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