val clientHelloExtension_e_session_ticket_clens:LL.clens clientHelloExtension_e_session_ticket
  sessionTicket
val clientHelloExtension_e_session_ticket_clens:LL.clens clientHelloExtension_e_session_ticket
  sessionTicket
let clientHelloExtension_e_session_ticket_clens : LL.clens clientHelloExtension_e_session_ticket sessionTicket = {
  LL.clens_cond = (fun _ -> True);
  LL.clens_get = (fun (x: clientHelloExtension_e_session_ticket) -> (x <: sessionTicket));
}
module MiTLS.Parsers.ClientHelloExtension_e_session_ticket

(* This file has been automatically generated by EverParse. *)
open FStar.Bytes
module U8 = FStar.UInt8
module U16 = FStar.UInt16
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module LP = LowParse.Spec.Base
module LS = LowParse.SLow.Base
module LSZ = LowParse.SLow.Base
module LPI = LowParse.Spec.AllIntegers
module LL = LowParse.Low.Base
module L = FStar.List.Tot
module B = LowStar.Buffer
module BY = FStar.Bytes
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST

open MiTLS.Parsers.SessionTicket

type clientHelloExtension_e_session_ticket = x:sessionTicket{let l = (sessionTicket_bytesize (x)) in 0 <= l /\ l <= 65535}

val check_clientHelloExtension_e_session_ticket_bytesize (x: sessionTicket) : Tot (b: bool {b == (let l = (sessionTicket_bytesize (x)) in 0 <= l && l <= 65535)})

inline_for_extraction noextract let clientHelloExtension_e_session_ticket_parser_kind = LP.strong_parser_kind 4 65537 None

noextract val clientHelloExtension_e_session_ticket_parser: LP.parser clientHelloExtension_e_session_ticket_parser_kind clientHelloExtension_e_session_ticket

noextract val clientHelloExtension_e_session_ticket_serializer: LP.serializer clientHelloExtension_e_session_ticket_parser

noextract val clientHelloExtension_e_session_ticket_bytesize (x:clientHelloExtension_e_session_ticket) : GTot nat

noextract val clientHelloExtension_e_session_ticket_bytesize_eq (x:clientHelloExtension_e_session_ticket) : Lemma (clientHelloExtension_e_session_ticket_bytesize x == Seq.length (LP.serialize clientHelloExtension_e_session_ticket_serializer x))

val clientHelloExtension_e_session_ticket_parser32: LS.parser32 clientHelloExtension_e_session_ticket_parser

val clientHelloExtension_e_session_ticket_serializer32: LS.serializer32 clientHelloExtension_e_session_ticket_serializer

val clientHelloExtension_e_session_ticket_size32: LSZ.size32 clientHelloExtension_e_session_ticket_serializer

val clientHelloExtension_e_session_ticket_validator: LL.validator clientHelloExtension_e_session_ticket_parser

val clientHelloExtension_e_session_ticket_jumper: LL.jumper clientHelloExtension_e_session_ticket_parser

val clientHelloExtension_e_session_ticket_finalize (#rrel: _) (#rel: _) (input: LL.slice rrel rel) (pos: U32.t) (pos'  : U32.t) : HST.Stack unit
  (requires (fun h ->
     U32.v pos + 2 < 4294967296 /\ (
     let pos_payload = pos `U32.add` 2ul in
     LL.writable input.LL.base (U32.v pos) (U32.v pos + 2) h /\
     LL.valid_pos sessionTicket_parser h input pos_payload pos' /\ (
     let len_payload = U32.v pos' - U32.v pos_payload in
     let x = LL.contents sessionTicket_parser h input pos_payload in
     let len_ser = (sessionTicket_bytesize (x)) in
     ((0 <= len_payload /\ len_payload <= 65535) \/ (0 <= len_ser /\ len_ser <= 65535))
  ))))
  (ensures (fun h _ h' ->
    let x = LL.contents sessionTicket_parser h input (pos `U32.add` 2ul) in
    let len_ser = (sessionTicket_bytesize (x)) in
    B.modifies (LL.loc_slice_from_to input pos (pos `U32.add` 2ul)) h h' /\
    0 <= len_ser /\ len_ser <= 65535 /\
    LL.valid_content_pos clientHelloExtension_e_session_ticket_parser h' input pos x pos'
  ))
/
prims.fst.checked MiTLS.Parsers.SessionTicket.fsti.checked LowStar.Buffer.fst.checked LowParse.Spec.Base.fsti.checked LowParse.Spec.AllIntegers.fst.checked LowParse.SLow.Base.fst.checked LowParse.Low.Base.fst.checked FStar.UInt8.fsti.checked FStar.UInt64.fsti.checked FStar.UInt32.fsti.checked FStar.UInt16.fsti.checked FStar.Seq.fst.checked FStar.Pervasives.fsti.checked FStar.List.Tot.fst.checked FStar.HyperStack.ST.fsti.checked FStar.HyperStack.fst.checked FStar.Bytes.fsti.checked
MiTLS.Parsers.ClientHelloExtension_e_session_ticket.fsti
LowParse.Low.Base.Spec.clens MiTLS.Parsers.ClientHelloExtension_e_session_ticket.clientHelloExtension_e_session_ticket
  MiTLS.Parsers.SessionTicket.sessionTicket
LowParse.Low.Base.Spec.Mkclens MiTLS.Parsers.ClientHelloExtension_e_session_ticket.clientHelloExtension_e_session_ticket MiTLS.Parsers.SessionTicket.sessionTicket Prims.l_True
let clientHelloExtension_e_session_ticket_clens:LL.clens clientHelloExtension_e_session_ticket
  sessionTicket =
  
{
  LL.clens_cond = (fun _ -> True);
  LL.clens_get = (fun (x: clientHelloExtension_e_session_ticket) -> (x <: sessionTicket))
}