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

Function computeAndUpdatePSK

handshake_client.go:1319–1327  ·  view source on GitHub ↗
(m *clientHelloMsg, binderKey []byte, transcript hash.Hash, finishedHash func([]byte, hash.Hash) []byte)

Source from the content-addressed store, hash-verified

1317}
1318
1319func computeAndUpdatePSK(m *clientHelloMsg, binderKey []byte, transcript hash.Hash, finishedHash func([]byte, hash.Hash) []byte) error {
1320 helloBytes, err := m.marshalWithoutBinders()
1321 if err != nil {
1322 return err
1323 }
1324 transcript.Write(helloBytes)
1325 pskBinders := [][]byte{finishedHash(binderKey, transcript)}
1326 return m.updateBinders(pskBinders)
1327}

Callers 2

loadSessionMethod · 0.85

Calls 4

finishedHashStruct · 0.85
marshalWithoutBindersMethod · 0.80
updateBindersMethod · 0.80
WriteMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…