hash

package
v5.0.0-...-2e5c9d0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

package hash provides a way for managing the underlying hash implementations used across go-git.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHash

func RegisterHash(h crypto.Hash, f func() hash.Hash) error

RegisterHash allows for the hash algorithm used to be overriden. This ensures the hash selection for go-git must be explicit, when overriding the default value.

Types

type Hash

type Hash interface {
	hash.Hash
}

Hash is the same as hash.Hash. This allows consumers to not having to import this package alongside "hash".

func New

func New(h crypto.Hash) Hash

New returns a new Hash for the given hash function. It panics if the hash function is not registered.

Jump to

Keyboard shortcuts

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