MCPcopy
hub / github.com/XTLS/REALITY / incSeq

Method incSeq

conn.go:247–259  ·  view source on GitHub ↗

incSeq increments the sequence number.

()

Source from the content-addressed store, hash-verified

245
246// incSeq increments the sequence number.
247func (hc *halfConn) incSeq() {
248 for i := 7; i >= 0; i-- {
249 hc.seq[i]++
250 if hc.seq[i] != 0 {
251 return
252 }
253 }
254
255 // Not allowed to let sequence number wrap.
256 // Instead, must renegotiate before it does.
257 // Not likely enough to bother.
258 panic("TLS: sequence number wraparound")
259}
260
261// explicitNonceLen returns the number of bytes of explicit nonce or IV included
262// in each record. Explicit nonces are present only in CBC modes after TLS 1.0

Callers 3

decryptMethod · 0.95
encryptMethod · 0.95
ServerFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected