Implements a hash-tree for a buffer in Go