hashtree

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildMerkelRootHash added in v0.2.5

func BuildMerkelRootHash(segmentHash []string) (string, error)

BuildMerkelRootHash

func BuildSimpleMerkelRootHash added in v0.2.5

func BuildSimpleMerkelRootHash(segmentHash string) (string, error)

BuildSimpleMerkelRootHash

func NewHashTree

func NewHashTree(chunkPath []string) (*merkletree.MerkleTree, error)

NewHashTree build file to build hash tree

Types

type HashTreeContent

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

HashTreeContent implements the Content interface provided by merkletree and represents the content stored in the tree.

func (HashTreeContent) CalculateHash

func (t HashTreeContent) CalculateHash() ([]byte, error)

CalculateHash hashes the values of a HashTreeContent

func (HashTreeContent) Equals

func (t HashTreeContent) Equals(other merkletree.Content) (bool, error)

Equals tests for equality of two Contents

Jump to

Keyboard shortcuts

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