infohash

package
v0.0.0-...-6e19431 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Size = 20

Variables

This section is empty.

Functions

This section is empty.

Types

type T

type T [Size]byte

20-byte SHA1 hash used for info and pieces.

func FromHexString

func FromHexString(s string) (h T)

func HashBytes

func HashBytes(b []byte) (ret T)

func HashBytesV2

func HashBytesV2(b []byte) (ret T)

func (T) AsString

func (t T) AsString() string

func (T) Bytes

func (t T) Bytes() []byte

func (T) Format

func (t T) Format(f fmt.State, c rune)

func (*T) FromHexString

func (t *T) FromHexString(s string) (err error)

func (T) HexString

func (t T) HexString() string

func (*T) IsZero

func (t *T) IsZero() bool

func (T) MarshalText

func (t T) MarshalText() (text []byte, err error)

func (T) String

func (t T) String() string

func (*T) UnmarshalText

func (t *T) UnmarshalText(b []byte) error

Jump to

Keyboard shortcuts

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