infohash

package
v1.52.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: MPL-2.0 Imports: 4 Imported by: 23

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 (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) 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