Standard library / crypto/tls
tls.QUICEncryptionLevel
Identifies Initial, Early, Handshake or Application protection levels. Pass the correct level with received handshake bytes. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
type QUICEncryptionLevel intWorking Example
Example Snippetgo
package main
import ( "crypto/tls" "fmt")
func main() { var level tls.QUICEncryptionLevel = tls.QUICEncryptionLevelInitial fmt.Println(level == tls.QUICEncryptionLevelInitial)}
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) }}