code: func (d *digest) initialize(c *Config) {
  	// Create parameter block.
  	var p [BlockSize]byte
  	p[0] = c.Size
  	p[1] = uint8(len(c.Key))
  	if c.Salt != nil {
  		copy(p[32:], c.Salt)
  	}
  	if c.Person != nil {
  		copy(p[48:], c.Person)
  	}
  	if c.Tree != nil {
  		p[2] = c.Tree.Fanout
  		p[3] = c.Tree.MaxDepth
  		binary.LittleEndian.PutUint32(p[4:], c.Tree.LeafSize)
  		binary.LittleEndian.PutUint64(p[8:], c.Tree.NodeOffset)
  		p[16] = c.Tree.NodeDepth
  		p[17] = c.Tree.InnerHashSize
  	} else {
  		p[2] = 1
  		p[3] = 1
  	}
  
  	// Initialize.
  	d.size = c.Size
  	for i := 0; i < 8; i++ {
  		d.h[i] = iv[i] ^ binary.LittleEndian.Uint64(p[i*8:])
  	}
  	if c.Tree != nil && c.Tree.IsLastNode {
  		d.isLastNode = true
  	}
  
  	// Process key.
  	if c.Key != nil {
  		copy(d.paddedKey[:], c.Key)
  		d.Write(d.paddedKey[:])
  		d.isKeyed = true
  	}
  	// Save a copy of initialized state.
  	copy(d.ih[:], d.h[:])
  }
docs: // initialize initializes digest with the given
  // config, which must be non-nil and verified.