Documentation ¶
Overview ¶
Package reference is a simple nonconcurrent reference implementation for hashsize segment based Binary Merkle tree hash on arbitrary but fixed maximum chunksize n where 0 <= n <= 4096
This implementation does not take advantage of any paralellisms and uses far more memory than necessary, but it is easy to see that it is correct. It can be used for generating test cases for optimized implementations. There is extra check on reference hasher correctness in bmt_test.go * TestRefHasher * testBMTHasherCorrectness function
Package reference is a simple nonconcurrent reference implementation of the BMT hash ¶
This implementation does not take advantage of any paralellisms and uses far more memory than necessary, but it is easy to see that it is correct. It can be used for generating test cases for optimized implementations. There is extra check on reference hasher correctness in reference_test.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RefHasher ¶
type RefHasher struct {
// contains filtered or unexported fields
}
RefHasher is the non-optimized easy-to-read reference implementation of BMT.
func NewRefHasher ¶
NewRefHasher returns a new RefHasher.