github.com/danielpfeifer02/quic-go-prio-packs@v0.41.0-28/internal/protocol/encryption_level.go (about) 1 package protocol 2 3 // EncryptionLevel is the encryption level 4 // Default value is Unencrypted 5 type EncryptionLevel uint8 6 7 const ( 8 // EncryptionInitial is the Initial encryption level 9 EncryptionInitial EncryptionLevel = 1 + iota 10 // EncryptionHandshake is the Handshake encryption level 11 EncryptionHandshake 12 // Encryption0RTT is the 0-RTT encryption level 13 Encryption0RTT 14 // Encryption1RTT is the 1-RTT encryption level 15 Encryption1RTT 16 ) 17 18 func (e EncryptionLevel) String() string { 19 switch e { 20 case EncryptionInitial: 21 return "Initial" 22 case EncryptionHandshake: 23 return "Handshake" 24 case Encryption0RTT: 25 return "0-RTT" 26 case Encryption1RTT: 27 return "1-RTT" 28 } 29 return "unknown" 30 }