hashtree

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 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