code: func hashForServerKeyExchange(sigAndHash signatureAndHash, version uint16, slices ...[]byte) ([]byte, crypto.Hash, error) {
  	if version >= VersionTLS12 {
  		if !isSupportedSignatureAndHash(sigAndHash, supportedSignatureAlgorithms) {
  			return nil, crypto.Hash(0), errors.New("tls: unsupported hash function used by peer")
  		}
  		hashFunc, err := lookupTLSHash(sigAndHash.hash)
  		if err != nil {
  			return nil, crypto.Hash(0), err
  		}
  		h := hashFunc.New()
  		for _, slice := range slices {
  			h.Write(slice)
  		}
  		digest := h.Sum(nil)
  		return digest, hashFunc, nil
  	}
  	if sigAndHash.signature == signatureECDSA {
  		return sha1Hash(slices), crypto.SHA1, nil
  	}
  	return md5SHA1Hash(slices), crypto.MD5SHA1, nil
  }
docs: // hashForServerKeyExchange hashes the given slices and returns their digest
  // and the identifier of the hash function used. The sigAndHash argument is
  // only used for >= TLS 1.2 and precisely identifies the hash function to use.