MCPcopy Index your code
hub / github.com/XTLS/REALITY / curveForCurveID

Function curveForCurveID

key_schedule.go:72–85  ·  view source on GitHub ↗
(id CurveID)

Source from the content-addressed store, hash-verified

70}
71
72func curveForCurveID(id CurveID) (ecdh.Curve, bool) {
73 switch id {
74 case X25519:
75 return ecdh.X25519(), true
76 case CurveP256:
77 return ecdh.P256(), true
78 case CurveP384:
79 return ecdh.P384(), true
80 case CurveP521:
81 return ecdh.P521(), true
82 default:
83 return nil, false
84 }
85}

Callers 6

makeClientHelloMethod · 0.85
processClientHelloMethod · 0.85
generateECDHEKeyFunction · 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…