val clientHelloExtension_e_pre_shared_key_validator: LL.validator clientHelloExtension_e_pre_shared_key_parser
val clientHelloExtension_e_pre_shared_key_validator: LL.validator clientHelloExtension_e_pre_shared_key_parser
let clientHelloExtension_e_pre_shared_key_validator = LL.validate_synth clientHelloExtension_e_pre_shared_key'_validator synth_clientHelloExtension_e_pre_shared_key ()
module MiTLS.Parsers.ClientHelloExtension_e_pre_shared_key

(* 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
module LT = LowParse.TacLib
module LS = LowParse.SLow
module LSZ = LowParse.SLow
module LPI = LowParse.Spec.AllIntegers
module LL = LowParse.Low
module L = FStar.List.Tot
module B = LowStar.Buffer
module BY = FStar.Bytes
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST

#reset-options "--using_facts_from '* -FStar.Tactics -FStar.Reflection' --z3rlimit 16 --z3cliopt smt.arith.nl=false --max_fuel 2 --max_ifuel 2"

let check_clientHelloExtension_e_pre_shared_key_bytesize x =
  [@inline_let] let _ = (preSharedKeyClientExtension_bytesize_eq (x)) in
  let l = preSharedKeyClientExtension_size32 x in
  0ul `U32.lte` l && l `U32.lte` 65535ul

type clientHelloExtension_e_pre_shared_key' = LP.parse_bounded_vldata_strong_t 0 65535 preSharedKeyClientExtension_serializer

inline_for_extraction let synth_clientHelloExtension_e_pre_shared_key (x: clientHelloExtension_e_pre_shared_key') : Tot clientHelloExtension_e_pre_shared_key =
  [@inline_let] let _ = (preSharedKeyClientExtension_bytesize_eq (x)) in x

inline_for_extraction let synth_clientHelloExtension_e_pre_shared_key_recip (x: clientHelloExtension_e_pre_shared_key) : Tot clientHelloExtension_e_pre_shared_key' =
  [@inline_let] let _ = (preSharedKeyClientExtension_bytesize_eq (x)) in x

noextract let clientHelloExtension_e_pre_shared_key'_parser : LP.parser _ clientHelloExtension_e_pre_shared_key' =
  LP.parse_bounded_vldata_strong 0 65535 preSharedKeyClientExtension_serializer

let clientHelloExtension_e_pre_shared_key_parser = LP.parse_synth clientHelloExtension_e_pre_shared_key'_parser synth_clientHelloExtension_e_pre_shared_key

noextract let clientHelloExtension_e_pre_shared_key'_serializer : LP.serializer clientHelloExtension_e_pre_shared_key'_parser =
  LP.serialize_bounded_vldata_strong 0 65535 preSharedKeyClientExtension_serializer

let clientHelloExtension_e_pre_shared_key_serializer = LP.serialize_synth _ synth_clientHelloExtension_e_pre_shared_key clientHelloExtension_e_pre_shared_key'_serializer synth_clientHelloExtension_e_pre_shared_key_recip ()

let clientHelloExtension_e_pre_shared_key_bytesize (x:clientHelloExtension_e_pre_shared_key) : GTot nat = Seq.length (clientHelloExtension_e_pre_shared_key_serializer x)

let clientHelloExtension_e_pre_shared_key_bytesize_eq x = ()

inline_for_extraction let clientHelloExtension_e_pre_shared_key'_parser32 : LS.parser32 clientHelloExtension_e_pre_shared_key'_parser =
  LS.parse32_bounded_vldata_strong 0 0ul 65535 65535ul preSharedKeyClientExtension_serializer preSharedKeyClientExtension_parser32

let clientHelloExtension_e_pre_shared_key_parser32 = LS.parse32_synth' _ synth_clientHelloExtension_e_pre_shared_key clientHelloExtension_e_pre_shared_key'_parser32 ()

inline_for_extraction noextract let clientHelloExtension_e_pre_shared_key'_serializer32 : LS.serializer32 clientHelloExtension_e_pre_shared_key'_serializer =
  LS.serialize32_bounded_vldata_strong 0 65535 preSharedKeyClientExtension_serializer32

let clientHelloExtension_e_pre_shared_key_serializer32 = LS.serialize32_synth' _ synth_clientHelloExtension_e_pre_shared_key _ clientHelloExtension_e_pre_shared_key'_serializer32 synth_clientHelloExtension_e_pre_shared_key_recip ()

inline_for_extraction noextract let clientHelloExtension_e_pre_shared_key'_size32 : LSZ.size32 clientHelloExtension_e_pre_shared_key'_serializer =
  LSZ.size32_bounded_vldata_strong 0 65535 preSharedKeyClientExtension_size32 2ul

let clientHelloExtension_e_pre_shared_key_size32 = LSZ.size32_synth' _ synth_clientHelloExtension_e_pre_shared_key _ clientHelloExtension_e_pre_shared_key'_size32 synth_clientHelloExtension_e_pre_shared_key_recip ()

inline_for_extraction let clientHelloExtension_e_pre_shared_key'_validator : LL.validator clientHelloExtension_e_pre_shared_key'_parser =
  LL.validate_bounded_vldata_strong 0 65535 preSharedKeyClientExtension_serializer preSharedKeyClientExtension_validator ()
/
prims.fst.checked LowStar.Buffer.fst.checked LowParse.TacLib.fst.checked LowParse.Spec.AllIntegers.fst.checked LowParse.Spec.fst.checked LowParse.SLow.fst.checked LowParse.Low.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_pre_shared_key.fst
LowParse.Low.Base.validator MiTLS.Parsers.ClientHelloExtension_e_pre_shared_key.clientHelloExtension_e_pre_shared_key_parser

LowParse.Low.Combinators.validate_synth LowParse.Spec.VLData.parse_bounded_vldata_strong_kind LowParse.Spec.BoundedInt.log256' MiTLS.Parsers.PreSharedKeyClientExtension.preSharedKeyClientExtension_parser_kind MiTLS.Parsers.ClientHelloExtension_e_pre_shared_key.clientHelloExtension_e_pre_shared_key' MiTLS.Parsers.ClientHelloExtension_e_pre_shared_key.clientHelloExtension_e_pre_shared_key MiTLS.Parsers.ClientHelloExtension_e_pre_shared_key.clientHelloExtension_e_pre_shared_key'_parser MiTLS.Parsers.ClientHelloExtension_e_pre_shared_key.clientHelloExtension_e_pre_shared_key'_validator MiTLS.Parsers.ClientHelloExtension_e_pre_shared_key.synth_clientHelloExtension_e_pre_shared_key
let clientHelloExtension_e_pre_shared_key_validator =
  
LL.validate_synth clientHelloExtension_e_pre_shared_key'_validator
  synth_clientHelloExtension_e_pre_shared_key
  ()