file

package
v1.0.0-cli.0...-1fe6628 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package file provides structs for a common way to represent files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeHashStr

func ComputeHashStr(file io.ReadSeekCloser) (string, error)

ComputeHashStr computes a xxh3 hash from the given io.ReadSeekCloser. this is designed to be able to be used with large amounts of data.

func HashTree

func HashTree[T merkletree.Content](hashes []T) (*merkletree.MerkleTree, error)

func HashTreeRootString

func HashTreeRootString(tree *merkletree.MerkleTree) string

func SortHashes

func SortHashes(hashes []Hash)

Types

type Hash

type Hash struct {
	Path string
	Hash string
}

func (Hash) CalculateHash

func (f Hash) CalculateHash() ([]byte, error)

func (Hash) Equals

func (f Hash) Equals(other merkletree.Content) (bool, error)

Jump to

Keyboard shortcuts

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