MCPcopy Create free account
hub / github.com/XTLS/Go / setTrafficSecret

Method setTrafficSecret

conn.go:248–255  ·  view source on GitHub ↗
(suite *cipherSuiteTLS13, secret []byte)

Source from the content-addressed store, hash-verified

246}
247
248func (hc *halfConn) setTrafficSecret(suite *cipherSuiteTLS13, secret []byte) {
249 hc.trafficSecret = secret
250 key, iv := suite.trafficKey(secret)
251 hc.cipher = suite.aead(key, iv)
252 for i := range hc.seq {
253 hc.seq[i] = 0
254 }
255}
256
257// incSeq increments the sequence number.
258func (hc *halfConn) incSeq() {

Callers 7

handleKeyUpdateMethod · 0.80
readServerFinishedMethod · 0.80
sendClientFinishedMethod · 0.80
sendServerParametersMethod · 0.80
sendServerFinishedMethod · 0.80
readClientFinishedMethod · 0.80

Calls 1

trafficKeyMethod · 0.80

Tested by

no test coverage detected