Standard library / crypto/tls

tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305

IANA cipher suite identifier TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305. Historical TLS 1.2-or-earlier identifier; availability and security depend on the suite and toolchain. Do not enable obsolete suites merely because the constant exists. The example prints the numeric identifier, not a negotiated value. Expected stdout: '52392\n'.

Formal Syntax & Structure

go syntaxgo
const TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 uint16 = 52392

Working Example

Example Snippetgo
package main
import (  "crypto/tls"  "fmt")
func main() { fmt.Println(uint16(tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305)) }
func must[T any](v T, e error) T {  if e != nil {    panic(e)  }  return v}func check(e error) {  if e != nil {    panic(e)  }}
Go Reference