code: func pHash(result, secret, seed []byte, hash func() hash.Hash) {
  	h := hmac.New(hash, secret)
  	h.Write(seed)
  	a := h.Sum(nil)
  
  	j := 0
  	for j < len(result) {
  		h.Reset()
  		h.Write(a)
  		h.Write(seed)
  		b := h.Sum(nil)
  		todo := len(b)
  		if j+todo > len(result) {
  			todo = len(result) - j
  		}
  		copy(result[j:j+todo], b)
  		j += todo
  
  		h.Reset()
  		h.Write(a)
  		a = h.Sum(nil)
  	}
  }
docs: // pHash implements the P_hash function, as defined in RFC 4346, section 5.