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

Struct finishedHash

prf.go:159–172  ·  view source on GitHub ↗

A finishedHash calculates the hash of a set of handshake messages suitable for including in a Finished message.

Source from the content-addressed store, hash-verified

157// A finishedHash calculates the hash of a set of handshake messages suitable
158// for including in a Finished message.
159type finishedHash struct {
160 client hash.Hash
161 server hash.Hash
162
163 // Prior to TLS 1.2, an additional MD5 hash is required.
164 clientMD5 hash.Hash
165 serverMD5 hash.Hash
166
167 // In TLS 1.2, a full buffer is sadly required.
168 buffer []byte
169
170 version uint16
171 prf func(result, secret, label, seed []byte)
172}
173
174func (h *finishedHash) Write(msg []byte) (n int, err error) {
175 h.client.Write(msg)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected