MCPcopy Create free account
hub / github.com/XTLS/REALITY / CipherSuiteName

Function CipherSuiteName

cipher_suites.go:99–111  ·  view source on GitHub ↗

CipherSuiteName returns the standard name for the passed cipher suite ID (e.g. "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"), or a fallback representation of the ID value if the cipher suite is not implemented by this package.

(id uint16)

Source from the content-addressed store, hash-verified

97// (e.g. "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"), or a fallback representation
98// of the ID value if the cipher suite is not implemented by this package.
99func CipherSuiteName(id uint16) string {
100 for _, c := range CipherSuites() {
101 if c.ID == id {
102 return c.Name
103 }
104 }
105 for _, c := range InsecureCipherSuites() {
106 if c.ID == id {
107 return c.Name
108 }
109 }
110 return fmt.Sprintf("0x%04X", id)
111}
112
113const (
114 // suiteECDHE indicates that the cipher suite involves elliptic curve

Callers

nothing calls this directly

Calls 2

CipherSuitesFunction · 0.85
InsecureCipherSuitesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…