code: func (c *Config) SetDefaults() {
  	if c.Rand == nil {
  		c.Rand = rand.Reader
  	}
  	if c.Ciphers == nil {
  		c.Ciphers = supportedCiphers
  	}
  	var ciphers []string
  	for _, c := range c.Ciphers {
  		if cipherModes[c] != nil {
  			// reject the cipher if we have no cipherModes definition
  			ciphers = append(ciphers, c)
  		}
  	}
  	c.Ciphers = ciphers
  
  	if c.KeyExchanges == nil {
  		c.KeyExchanges = supportedKexAlgos
  	}
  
  	if c.MACs == nil {
  		c.MACs = supportedMACs
  	}
  
  	if c.RekeyThreshold == 0 {
  		// RFC 4253, section 9 suggests rekeying after 1G.
  		c.RekeyThreshold = 1 << 30
  	}
  	if c.RekeyThreshold < minRekeyThreshold {
  		c.RekeyThreshold = minRekeyThreshold
  	}
  }
docs: // SetDefaults sets sensible values for unset fields in config. This is
  // exported for testing: Configs passed to SSH functions are copied and have
  // default values set automatically.