hasher

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReferenceHasher added in v0.5.8

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

ReferenceHasher is the source-of-truth implementation of the swarm file hashing algorithm

func NewReferenceHasher added in v0.5.8

func NewReferenceHasher(params *treeParams) *ReferenceHasher

NewReferenceHasher constructs and returns a new ReferenceHasher This implementation is limited to a tree of 9 levels, where level 0 is the data level With 32 section size and 128 branches (i.e. unencrypted, non erasure-coded content) this means a capacity of 4096 bytes * (128^(9-1)) ~ 295.148 * (10^18) bytes

func (*ReferenceHasher) Hash added in v0.5.8

func (r *ReferenceHasher) Hash(data []byte) []byte

Hash computes and returns the root hash of arbitrary data

Jump to

Keyboard shortcuts

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