func (m *Hasher) HashLeaf(treeID int64, id node.ID, leaf []byte) []byte {
	depth := int(id.BitLen())
	buf := bytes.NewBuffer(make([]byte, 0, 32+len(leaf)))
	h := m.New()
	buf.Write(leafIdentifier)
	binary.Write(buf, binary.BigEndian, uint64(treeID))
	m.writeMaskedNodeID(buf, id)
	binary.Write(buf, binary.BigEndian, uint32(depth))
	buf.Write(leaf)
	h.Write(buf.Bytes())
	p := h.Sum(nil)
	if glog.V(5) {
		glog.Infof("HashLeaf(%v, %s): %x", id, leaf, p)
	}
	return p
}
HashLeaf calculate the merkle tree leaf value:
H(Identifier || treeID || depth || index || dataHash)
package coniks
import (
	"bytes"
	"crypto"
	"encoding/binary"
	"fmt"
	"github.com/golang/glog"
	"github.com/google/trillian/merkle/smt/node"
)
var (
	leafIdentifier  = []byte("L")
	emptyIdentifier = []byte("E")
	Default = New(crypto.SHA512_256)
	zeroes = make([]byte, 32)
)
type Hasher struct {
	crypto.Hash
}
func New(h crypto.Hash) *Hasher {
	return &Hasher{Hash: h}
}
func (m *Hasher) EmptyRoot() []byte {
	panic("EmptyRoot() not defined for coniks.Hasher")
}
func (m *Hasher) HashEmpty(treeID int64, root node.ID) []byte {
	depth := int(root.BitLen())
	buf := bytes.NewBuffer(make([]byte, 0, 32))
	h := m.New()
	buf.Write(emptyIdentifier)
	binary.Write(buf, binary.BigEndian, uint64(treeID))
	m.writeMaskedNodeID(buf, root)
	binary.Write(buf, binary.BigEndian, uint32(depth))
	h.Write(buf.Bytes())
	r := h.Sum(nil)
	if glog.V(5) {
		glog.Infof("HashEmpty(%v): %x", root, r)
	}
	return r
}