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

Method extract

key_schedule.go:62–67  ·  view source on GitHub ↗

extract implements HKDF-Extract with the cipher suite hash.

(newSecret, currentSecret []byte)

Source from the content-addressed store, hash-verified

60
61// extract implements HKDF-Extract with the cipher suite hash.
62func (c *cipherSuiteTLS13) extract(newSecret, currentSecret []byte) []byte {
63 if newSecret == nil {
64 newSecret = make([]byte, c.hash.Size())
65 }
66 return hkdf.Extract(c.hash.New, newSecret, currentSecret)
67}
68
69// nextTrafficSecret generates the next traffic secret, given the current one,
70// according to RFC 8446, Section 7.2.

Callers 5

loadSessionMethod · 0.80
checkForResumptionMethod · 0.80
sendServerParametersMethod · 0.80
sendServerFinishedMethod · 0.80

Calls 1

SizeMethod · 0.80

Tested by

no test coverage detected