Y/P2      !"#$%&'()*+,-./01 unknown experimental#Vincent Hanquez <vincent@snarc.org>None 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 6 is the 6 input that had not yet been consumed (if any) when  the parse succeeded. 71Supply this continuation with more input so that 3 the parser can resume. To indicate that no more  input is available, use an 8 string. 9The parse failed. The : is the ) message describing the error, if any. ;Run the Get monad applies a get&-based parser on the input ByteString < If at least n2 bytes of input are available, return the current  input, otherwise fail. = If at least n2 bytes of input are available, return the current  input, otherwise fail. >$Immediately demand more input via a 7 continuation  result. ? An efficient get/ method for strict ByteStrings. Fails if fewer  than n< 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?@QRSTUVWXunknown experimental#Vincent Hanquez <vincent@snarc.org> Safe-InferredY[uintOfBytes returns the number of bytes and the unsigned integer represented by the bytes Z7intOfBytes returns the number of bytes in the list and # the represented integer by a two's completement list of bytes [(bytesOfInt convert an integer into a two' s completemented list of bytes Y\Z[]Y\Z[]Y\Z[] unknown experimental#Vincent Hanquez <vincent@snarc.org>None^parse an ASN1 header _"Parse the first word of an header `@putIdentifier encode an ASN1 Identifier into a marshalled value a.putLength encode a length into a ASN1 length. ) - see getLength for the encoding rules ^_bc`a^`^_bc`aunknown experimental#Vincent Hanquez <vincent@snarc.org>None unknown experimental#Vincent Hanquez <vincent@snarc.org>None9transform a list of ASN1 Events into a strict bytestring 7transform a list of ASN1 Events into a lazy bytestring unknown experimental#Vincent Hanquez <vincent@snarc.org>Noneunknown experimental#Vincent Hanquez <vincent@snarc.org> Safe-Inferred *Possible errors during parsing operations ?Policy failed including the name of the policy and the reason. "Decoding of a knowed type failed. BDecoding of a type that is not implemented. Contribution welcome. 8Parsing is not finished, there is construction unended. Parsing an invalid header. BAn unexpected situation has come up parsing an ASN1 event stream. ;A construction goes over the size specified in the header. !4Invalid primitive with infinite length in a stream. "Unexpected EOC in the stream.  !"d  !" "!  "! dunknown experimental#Vincent Hanquez <vincent@snarc.org>None #JDescribe 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 'JDescribe 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 *3decode a strict bytestring into an ASN1Repr stream +)encode a stream into a strict bytestring #$%&'()*+ #$%&'()*+ '(%&#$)*+#$%&'()*+ unknown experimental#Vincent Hanquez <vincent@snarc.org>Nonee)Represent the events and state thus far. f/represent the parsing state of an ASN1 stream. g3nothing means the parser stop this construction on 1 an ASN1 end tag, otherwise specify the position # where the construction terminate. h.create a new empty parse state. position is 0 i3run incrementally the ASN1 parser on a bytestring. 9 the result can be either an error, or on success a list ' of events, and the new parsing state. j#when no more input is available, it'(s important to check that the parser is  in a finish state too. ,MParse one lazy bytestring and returns on success all ASN1 events associated. -OParse one strict bytestring and returns on success all ASN1 events associated. efklmnoghpqri parser state input data as bytes j,-efhij,- efklmonghpqrij,-unknown experimental#Vincent Hanquez <vincent@snarc.org>None ,-  ,- unknown experimental#Vincent Hanquez <vincent@snarc.org>NonesbgetInteger, parse a value bytestring and get the integer out of the two complement encoded bytes tWgetEnumerated, 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{|}~stuvunknown experimental#Vincent Hanquez <vincent@snarc.org>None.#Distinguished Encoding Rules (DER) 0Basic Encoding Rules (BER) GDER 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.8.1Data.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.2.1Data.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.0.2Data.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