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

Function prf12

prf.go:74–78  ·  view source on GitHub ↗

prf12 implements the TLS 1.2 pseudo-random function, as defined in RFC 5246, Section 5.

(hashFunc func() hash.Hash)

Source from the content-addressed store, hash-verified

72
73// prf12 implements the TLS 1.2 pseudo-random function, as defined in RFC 5246, Section 5.
74func prf12(hashFunc func() hash.Hash) prfFunc {
75 return func(secret []byte, label string, seed []byte, keyLen int) []byte {
76 return tls12.PRF(hashFunc, secret, label, seed, keyLen)
77 }
78}
79
80const (
81 masterSecretLength = 48 // Length of a master secret in TLS 1.1.

Callers 1

prfAndHashForVersionFunction · 0.85

Calls 1

PRFFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…