Documentation ¶
Index ¶
- Constants
- func ToMultihash(t T) multihash.Multihash
- type T
- func (t *T) AsString() string
- func (t *T) Bytes() []byte
- func (t *T) Format(f fmt.State, c rune)
- func (t *T) FromHexString(s string) (err error)
- func (t *T) HexString() string
- func (t T) MarshalText() (text []byte, err error)
- func (t *T) String() string
- func (t *T) ToShort() (short *infohash.T)
- func (t *T) UnmarshalText(b []byte) error
Constants ¶
View Source
const Size = sha256.Size
Variables ¶
This section is empty.
Functions ¶
func ToMultihash ¶
func ToMultihash(t T) multihash.Multihash
Types ¶
type T ¶
32-byte SHA2-256 hash. See BEP 52.
func FromHexString ¶
func (*T) FromHexString ¶
func (T) MarshalText ¶
func (*T) ToShort ¶
Truncates the hash to 20 bytes for use in auxiliary interfaces, like DHT and trackers.
func (*T) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.