hash

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BtihData

type BtihData struct {
	Bytes hash.Sha1Sum
	Text  string
}

BtihData is the BitTorrent Info Hash (BTIH) check sum stored both as a text and as an array of bytes. This is an original first BTIH.

type BtihData2

type BtihData2 struct {
	Bytes hash.Sha256Sum
	Text  string
}

BtihData2 is the BitTorrent Info Hash (BTIH) check sum stored both as a text and as an array of bytes. This is the second version of BTIH.

type FileHash

type FileHash struct {
	// CRC32 check sum of the file.
	// This field is optional.
	// This is an un-official extension.
	Crc32 *hash.Crc32Sum

	// MD5 check sum of the file.
	// This field is optional.
	// Source: Bittorrent Protocol Specification v1.0
	// https://wiki.theory.org/BitTorrentSpecification
	Md5 *hash.Md5Sum

	// SHA-1 check sum of the file.
	// This field is optional.
	// This is an un-official extension.
	Sha1 *hash.Sha1Sum

	// SHA-256 check sum of the file.
	// This field is optional.
	// This is an un-official extension.
	Sha256 *hash.Sha256Sum
}

FileHash is a collection of file's hash sums. All these sums are optional.

Jump to

Keyboard shortcuts

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