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

Function newFinishedHash

prf.go:156–168  ·  view source on GitHub ↗
(version uint16, cipherSuite *cipherSuite)

Source from the content-addressed store, hash-verified

154}
155
156func newFinishedHash(version uint16, cipherSuite *cipherSuite) finishedHash {
157 var buffer []byte
158 if version >= VersionTLS12 {
159 buffer = []byte{}
160 }
161
162 prf, hash := prfAndHashForVersion(version, cipherSuite)
163 if hash != 0 {
164 return finishedHash{hash.New(), hash.New(), nil, nil, buffer, version, prf}
165 }
166
167 return finishedHash{sha1.New(), sha1.New(), md5.New(), md5.New(), buffer, version, prf}
168}
169
170// A finishedHash calculates the hash of a set of handshake messages suitable
171// for including in a Finished message.

Callers 3

handshakeMethod · 0.85
doResumeHandshakeMethod · 0.85
doFullHandshakeMethod · 0.85

Calls 1

prfAndHashForVersionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…