MCPcopy Index your code
hub / github.com/XTLS/Go / splitPreMasterSecret

Function splitPreMasterSecret

prf.go:20–24  ·  view source on GitHub ↗

Split a premaster secret in two as specified in RFC 4346, Section 5.

(secret []byte)

Source from the content-addressed store, hash-verified

18
19// Split a premaster secret in two as specified in RFC 4346, Section 5.
20func splitPreMasterSecret(secret []byte) (s1, s2 []byte) {
21 s1 = secret[0 : (len(secret)+1)/2]
22 s2 = secret[len(secret)/2:]
23 return
24}
25
26// pHash implements the P_hash function, as defined in RFC 4346, Section 5.
27func pHash(result, secret, seed []byte, hash func() hash.Hash) {

Callers 1

prf10Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…