hash

package
v0.0.0-...-c8d95c1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package hash implements 20-byte hashes as used by the BitTorrent protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

type Hash []byte

Hash is the type of 20-byte hashes

func Parse

func Parse(s string) Hash

Parse handles both hex and base-32 strings.

func (Hash) Equal

func (hash Hash) Equal(h Hash) bool

func (Hash) String

func (hash Hash) String() string

type HashPair

type HashPair struct {
	First  Hash
	Second Hash
}

A HashPair is a pair of hashes.

Jump to

Keyboard shortcuts

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