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
Click to show internal directories.
Click to hide internal directories.