code: func GetProposalHash1(header *common.Header, ccPropPayl []byte, visibility []byte) ([]byte, error) {
  	// check for nil argument
  	if header == nil ||
  		header.ChannelHeader == nil ||
  		header.SignatureHeader == nil ||
  		ccPropPayl == nil {
  		return nil, errors.New("nil arguments")
  	}
  
  	// unmarshal the chaincode proposal payload
  	cpp, err := GetChaincodeProposalPayload(ccPropPayl)
  	if err != nil {
  		return nil, err
  	}
  
  	ppBytes, err := GetBytesProposalPayloadForTx(cpp, visibility)
  	if err != nil {
  		return nil, err
  	}
  
  	hash2, err := factory.GetDefault().GetHash(&bccsp.SHA256Opts{})
  	if err != nil {
  		return nil, errors.WithMessage(err, "error instantiating hash function")
  	}
  	// hash the serialized Channel Header object
  	hash2.Write(header.ChannelHeader)
  	// hash the serialized Signature Header object
  	hash2.Write(header.SignatureHeader)
  	// hash of the part of the chaincode proposal payload that will go to the tx
  	hash2.Write(ppBytes)
  	return hash2.Sum(nil), nil
  }
docs: // GetProposalHash1 gets the proposal hash bytes after sanitizing the
  // chaincode proposal payload according to the rules of visibility