[S_2      !"#$%&'()*+,-./01  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNoneHM 2.The Get monad is an Exception and State monad.3!Have we read all available input?4The result of a parse.5The parse succeeded. The 6U is the input that had not yet been consumed (if any) when the parse succeeded.7Supply this continuation with more input so that the parser can resume. To indicate that no more input is available, use an 8 string.9The parse failed. The :0 is the message describing the error, if any.;Run the Get monad applies a get%-based parser on the input ByteString< If at least nK bytes of input are available, return the current input, otherwise fail.= If at least nK bytes of input are available, return the current input, otherwise fail.>$Immediately demand more input via a 7 continuation result.? 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.@Pull n. bytes from the input, as a strict ByteString.$2AB3CDEFGHI4579JKLMN;O<=>P?@QRSTUVWX 2I4579;O?@Q2AB3DCEFGHI4975JKLMN;O<=>P?@QRSTUVWX BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknown Safe-InferredYZuintOfBytes returns the number of bytes and the unsigned integer represented by the bytes ZxintOfBytes returns the number of bytes in the list and the represented integer by a two's completement list of bytes [HbytesOfInt convert an integer into a two's completemented list of bytes Y\Z[]Y\Z[]Y\Z[]  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone^parse an ASN1 header_!Parse the first word of an header`?putIdentifier encode an ASN1 Identifier into a marshalled valueaVputLength encode a length into a ASN1 length. - see getLength for the encoding rules ^_bc`a^`^_bc`a 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> experimentalunknown Safe-Inferred+ )Possible errors during parsing operations>Policy failed including the name of the policy and the reason.!Decoding of a knowed type failed.ADecoding of a type that is not implemented. Contribution welcome.7Parsing is not finished, there is construction unended.Parsing an invalid header.AAn unexpected situation has come up parsing an ASN1 event stream. :A construction goes over the size specified in the header.!3Invalid primitive with infinite length in a stream."Unexpected EOC in the stream.  !"d  !" "!  "! d 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> experimentalunknownNonee(Represent the events and state thus far.f.represent the parsing state of an ASN1 stream."the stack of constructed elements.the next expected type.the position in the stream.gnothing means the parser stop this construction on an ASN1 end tag, otherwise specify the position where the construction terminate.h-create a new empty parse state. position is 0irun 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.jcwhen 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.-NParse one strict bytestring and returns on success all ASN1 events associated.efklmnoghpqri parser stateinput data as bytesj,-efhij,- efklmonghpqrij,- BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone ,-  ,-  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone sagetInteger, parse a value bytestring and get the integer out of the two complement encoded bytes tVgetEnumerated, parse an enumerated value the same way that integer values are parsed. u]According to X.690 section 8.4 integer and enumerated values should be encoded the same way. vreturn an OID wxyz{|}~stuv&xy{|}~svwxyz{|}~stuv BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone."Distinguished Encoding Rules (DER)0Basic Encoding Rules (BER)FDER header need to be all of finite size and of minimum possible size. ./01./0101./ ./01                   ! " # $%&'()*+,-./0123456789: ; <==>>?@ABCDEFCGHIJKLMNOPQR?STUVWXYZ[\]^_`abcdefghijklmn o p q r s tu v w x y z { w | } ~                    asn1-encoding-0.9.0Data.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.Primasn1-types-0.3.0Data.ASN1.TypesfromASN1toASN1 ASN1ObjectData.ASN1.Types.Lowlevel Universal ApplicationContextPrivate ASN1ClassASN1TagLenShortLenLong LenIndefinite ASN1Length ASN1HeaderHeader PrimitiveConstructionBeginConstructionEnd ASN1Event toByteStringtoLazyByteStringASN1ReprgetConstructedEndgetConstructedEndRepr ASN1Error PolicyFailedTypeDecodingFailedTypeNotImplementedParsingPartialParsingHeaderFailStreamUnexpectedSituationStreamConstructionWrongSizeStreamInfinitePrimitiveStreamUnexpectedEOC ASN1Encoding encodeASN1ASN1DecodingReprdecodeASN1Repr ASN1Decoding decodeASN1 decodeASN1'decodeASN1Repr' encodeASN1'parseLBSparseBSDERBERGetMoreResultDonebytestring-0.10.4.0Data.ByteString.Internal ByteStringPartialData.ByteStringemptyFailbaseGHC.BaseString runGetPosensure ensureRec demandInput getBytesCopygetBytesunGet IncompleteCompletePositionSuccessFailureBufferInputappend bufferBytesputfinalKfailKrunGetfailDescgetWord8$fMonadPlusGet $fMonadGet$fAlternativeGet$fApplicativeGet $fFunctorGet$fFunctorResult $fShowResult uintOfBytes intOfBytes bytesOfInt bytesOfUIntputVarEncodingIntegral getHeaderparseFirstWord putHeader putLength getTagLong getLength$fExceptionASN1Error ParseCursor ParseStateConstructionEndAt newParseState runParseState isParseDone ParsePosition ParseExpectExpectPrimitive ExpectHeaderisEOCasn1LengthToConst mplusEither getInteger getEnumerated getIntegerRawgetOIDASN1Ret encodeHeaderencodePrimitiveHeaderencodePrimitiveDataencodePrimitive encodeOne encodeListencodeConstructedmkSmallestLengthdecodePrimitive getBoolean getBitStringgetCharacterStringgetOctetStringgetNullgetTimeputTime putInteger putBitString putStringputOIDSequenceSet ContainerASN1ConstructionTypeBooleanIntVal BitString OctetStringNullOIDReal Enumerated ASN1StringASN1TimeOtherStartEndASN1checkDERdecodeConstructiondecodeEventASN1Repr encodeToRaw$fASN1EncodingDER$fASN1DecodingDER$fASN1DecodingReprDER$fASN1DecodingBER$fASN1DecodingReprBER