\MS:      !"#$%&'()*+,-./0123456789  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownSafeOT :.The Get monad is an Exception and State monad.;!Have we read all available input?<The result of a parse.=The parse failed. The >0 is the message describing the error, if any.?Supply this continuation with more input so that the parser can resume. To indicate that no more input is available, use an @ string.AThe parse succeeded. The BU is the input that had not yet been consumed (if any) when the parse succeeded.CRun the Get monad applies a get%-based parser on the input ByteStringD If at least nK bytes of input are available, return the current input, otherwise fail.E If at least nK bytes of input are available, return the current input, otherwise fail.F$Immediately demand more input via a ? continuation result.G An efficient get5 method for strict ByteStrings. Fails if fewer than nZ bytes are left in the input. This function creates a fresh copy of the underlying bytes.HPull n. bytes from the input, as a strict ByteString.$:IJ;KLMNOPQ<=?ARSTUVCWDEFXGHYZ[\]^_` :Q<=A?CWGHY:IJ;KLMNOPQ<=?ARSTUVCWDEFXGHYZ[\]^_` BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownSafeaZuintOfBytes returns the number of bytes and the unsigned integer represented by the bytes bxintOfBytes returns the number of bytes in the list and the represented integer by a two's completement list of bytes cHbytesOfInt convert an integer into a two's completemented list of bytes adbceadbceadbce  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNonefparse an ASN1 headerg!Parse the first word of an headerh?putIdentifier encode an ASN1 Identifier into a marshalled valueiVputLength encode a length into a ASN1 length. - see getLength for the encoding rules fgjkhifhfgjkhi BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone8transform a list of ASN1 Events into a strict bytestring6transform a list of ASN1 Events into a lazy bytestring BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownSafe0 )Possible errors during parsing operationsUnexpected EOC in the stream.3Invalid primitive with infinite length in a stream.:A construction goes over the size specified in the header.AAn unexpected situation has come up parsing an ASN1 event stream.Parsing an invalid header.7Parsing is not finished, there is construction unended. ADecoding of a type that is not implemented. Contribution welcome.!!Decoding of a knowed type failed.">Policy failed including the name of the policy and the reason.  !"#  !"  !"  !"# BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone &IDescribe an ASN1 encoding, that transform an asn1stream into a bytestream'&encode a stream into a lazy bytestring(transition class.),decode a lazy bytestring into an ASN1 stream*IDescribe an ASN1 decoding, that transform a bytestream into an asn1stream+,decode a lazy bytestring into an ASN1 stream,.decode a strict bytestring into an ASN1 stream-2decode a strict bytestring into an ASN1Repr stream.(encode a stream into a strict bytestring &'()*+,-. &'()*+,-. *+()&',-.&'()*+,-.  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNonel(Represent the events and state thus far.m.represent the parsing state of an ASN1 stream."the stack of constructed elements.the next expected type.the position in the stream.nnothing means the parser stop this construction on an ASN1 end tag, otherwise specify the position where the construction terminate.o-create a new empty parse state. position is 0prun incrementally the ASN1 parser on a bytestring. the result can be either an error, or on success a list of events, and the new parsing state.qcwhen no more input is available, it's important to check that the parser is in a finish state too./LParse one lazy bytestring and returns on success all ASN1 events associated.0NParse one strict bytestring and returns on success all ASN1 events associated.lmrstuvnowxyp parser stateinput data as bytesq/0lmopq/0 lmrstuvnowxypq/0 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone  /0  /0  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone$zagetInteger, parse a value bytestring and get the integer out of the two complement encoded bytes {VgetEnumerated, parse an enumerated value the same way that integer values are parsed. |]According to X.690 section 8.4 integer and enumerated values should be encoded the same way. }return an OID ~z{|}&z}~z{|} BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone1"Distinguished Encoding Rules (DER)3Basic Encoding Rules (BER)FDER header need to be all of finite size and of minimum possible size. 12345678912343412 123456789                   ! " # $%&'()*+,-./0123456789:;<= > ?@@AABCDEFGHIJKLMNOPQROSTUVWXYZG[\]^_`abcdefghijklmnopqrstuv w x y z { | } ~  ~                       *asn1-encoding-0.9.4-G3Eu427lfih60n7Hu41ILmData.ASN1.ObjectData.ASN1.BinaryEncoding.RawData.ASN1.StreamData.ASN1.ErrorData.ASN1.EncodingData.ASN1.BinaryEncoding Data.ASN1.GetData.ASN1.InternalData.ASN1.SerializeData.ASN1.BinaryEncoding.WriterData.ASN1.BinaryEncoding.ParseData.ASN1.Prim'asn1-types-0.3.2-7OJ0HzVkSNEBIwzF1QvaHdData.ASN1.TypesfromASN1toASN1 ASN1ObjectData.ASN1.Types.LowlevelPrivateContext Application Universal ASN1ClassASN1Tag LenIndefiniteLenLongLenShort ASN1Length ASN1HeaderConstructionEndConstructionBegin PrimitiveHeader ASN1Event toByteStringtoLazyByteStringASN1ReprgetConstructedEndgetConstructedEndRepr ASN1ErrorStreamUnexpectedEOCStreamInfinitePrimitiveStreamConstructionWrongSizeStreamUnexpectedSituationParsingHeaderFailParsingPartialTypeNotImplementedTypeDecodingFailed PolicyFailed$fExceptionASN1Error$fShowASN1Error $fEqASN1Error ASN1Encoding encodeASN1ASN1DecodingReprdecodeASN1Repr ASN1Decoding decodeASN1 decodeASN1'decodeASN1Repr' encodeASN1'parseLBSparseBSDERBER$fASN1EncodingDER$fASN1DecodingDER$fASN1DecodingReprDER$fASN1DecodingBER$fASN1DecodingReprBERGetMoreResultFailbaseGHC.BaseStringPartialbytestring-0.10.8.1Data.ByteStringemptyDoneData.ByteString.Internal ByteString runGetPosensure ensureRec demandInput getBytesCopygetBytesunGetComplete IncompletePositionSuccessFailureBufferInputappend bufferBytesputfinalKfailKrunGetfailDescgetWord8$fMonadPlusGet $fMonadGet$fAlternativeGet$fApplicativeGet $fFunctorGet$fFunctorResult $fShowResult uintOfBytes intOfBytes bytesOfInt bytesOfUIntputVarEncodingIntegral getHeaderparseFirstWord putHeader putLength getTagLong getLength ParseCursor ParseStateConstructionEndAt newParseState runParseState isParseDone ParsePosition ParseExpect ExpectHeaderExpectPrimitiveisEOCasn1LengthToConst mplusEither getInteger getEnumerated getIntegerRawgetOIDASN1Ret encodeHeaderencodePrimitiveHeaderencodePrimitiveDataencodePrimitive encodeOne encodeListencodeConstructedmkSmallestLengthdecodePrimitive getBoolean getBitStringgetCharacterStringgetOctetStringgetNullgetTimeputTime putInteger putBitString putStringputOIDASN1ConstructionTypeSequenceSet ContainerASN1RealOIDBooleanIntVal BitString OctetStringNull Enumerated ASN1StringASN1TimeOtherStartEndcheckDERdecodeConstructiondecodeEventASN1Repr encodeToRaw