val get_pn_length (h: Public.header) : Tot PN.packet_number_length_t
val get_pn_length (h: Public.header) : Tot PN.packet_number_length_t
let get_pn_length
  (h: Public.header)
: Tot PN.packet_number_length_t 
= protected_bits_pn_length (Public.PShort? h) (Public.get_protected_bits h)
module QUIC.Spec.Header.Parse

module PN = QUIC.Spec.PacketNumber
module Public = QUIC.Spec.Header.Public
module LP = LowParse.Spec.Combinators
module Secret = QUIC.Secret.Int
module BF = LowParse.BitFields
module U8 = FStar.UInt8
module Seq = QUIC.Secret.Seq
module U64 = FStar.UInt64
module Cast = FStar.Int.Cast

let protected_bits_pn_length
  (is_short: bool)
  (pb: bitfield (if is_short then 5 else 4))
: Tot PN.packet_number_length_t
= Secret.to_u32 #Secret.U8 (1uy `Secret.add` Secret.get_bitfield #Secret.U8 pb 0ul 2ul)
/
QUIC.Spec.PacketNumber.fsti.checked QUIC.Spec.Header.Public.fsti.checked QUIC.Secret.Seq.fsti.checked QUIC.Secret.Int.fsti.checked prims.fst.checked LowParse.Spec.Combinators.fsti.checked LowParse.BitFields.fsti.checked FStar.UInt8.fsti.checked FStar.UInt64.fsti.checked FStar.UInt32.fsti.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked FStar.Math.Lemmas.fst.checked FStar.Int.Cast.fst.checked
QUIC.Spec.Header.Parse.fst
h: QUIC.Spec.Header.Public.header -> QUIC.Spec.PacketNumber.Base.packet_number_length_t
QUIC.Spec.Header.Public.header QUIC.Spec.Header.Parse.protected_bits_pn_length QUIC.Spec.Header.Public.uu___is_PShort QUIC.Spec.Header.Public.get_protected_bits QUIC.Spec.PacketNumber.Base.packet_number_length_t
let get_pn_length (h: Public.header) : Tot PN.packet_number_length_t =
  
protected_bits_pn_length (Public.PShort? h) (Public.get_protected_bits h)