ht

package
v0.10.9 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Id_FileExistence = HashTypeId(1)
	Id_FileSize      = HashTypeId(2)
	Id_CRC32         = HashTypeId(3)
	Id_MD5           = HashTypeId(4)
	Id_SHA256        = HashTypeId(5)
)
View Source
const (
	Name_FileExistence = HashTypeName("EXISTENCE")
	Name_FileSize      = HashTypeName("SIZE")
	Name_CRC32         = HashTypeName("CRC32")
	Name_MD5           = HashTypeName("MD5")
	Name_SHA256        = HashTypeName("SHA256")
)
View Source
const (
	ErrUnknownHashType = "unknown hash type"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HashType

type HashType struct {
	// contains filtered or unexported fields
}

func New

func New(hashTypeName HashTypeName) (ht *HashType, err error)

func NewById added in v0.10.0

func NewById(hashTypeId HashTypeId) (ht *HashType, err error)

func NewByName added in v0.10.0

func NewByName(hashTypeName HashTypeName) (ht *HashType, err error)

func (*HashType) ID

func (ht *HashType) ID() (id HashTypeId)

func (*HashType) IsBinary added in v0.10.0

func (ht *HashType) IsBinary() (isBinary bool)

func (*HashType) Name

func (ht *HashType) Name() (name HashTypeName)

func (*HashType) SumSize added in v0.10.0

func (ht *HashType) SumSize() (sumSize hs.HashSize)

type HashTypeId added in v0.10.0

type HashTypeId byte

type HashTypeName added in v0.10.0

type HashTypeName string

Jump to

Keyboard shortcuts

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