\T-;      !"#$%&'()*+,-./0123456789:  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownSafe;ZuintOfBytes returns the number of bytes and the unsigned integer represented by the bytes <xintOfBytes 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 ;><=?;><=?;><=? BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownSafeOT @.The Get monad is an Exception and State monad.A!Have we read all available input?BThe result of a parse.CThe parse failed. The D0 is the message describing the error, if any.ESupply this continuation with more input so that the parser can resume. To indicate that no more input is available, use an F string.GThe parse succeeded. The HU is the input that had not yet been consumed (if any) when the parse succeeded.IRun the Get monad applies a get%-based parser on the input ByteStringJ If at least nK bytes of input are available, return the current input, otherwise fail.K If at least nK bytes of input are available, return the current input, otherwise fail.L$Immediately demand more input via a E continuation result.M 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.NPull n. bytes from the input, as a strict ByteString.$@OPAQRSTUVWBCEGXYZ[\I]JKL^MN_`abcdef @WBCGEI]MN_@OPAQRSTUVWBCEGXYZ[\I]JKL^MN_`abcdef  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNonegparse an ASN1 headerh!Parse the first word of an headeri?putIdentifier encode an ASN1 Identifier into a marshalled valuejVputLength encode a length into a ASN1 length. - see getLength for the encoding rules ghklijgighklij 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. Invalid primitive type!>Policy failed including the name of the policy and the reason.  !"  !  !  !"  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone$magetInteger, parse a value bytestring and get the integer out of the two complement encoded bytes nVgetEnumerated, parse an enumerated value the same way that integer values are parsed. o]According to X.690 section 8.4 integer and enumerated values should be encoded the same way. preturn an OID qrstuvwxyz{mno|}~p&rsuvwxyz{m|~pqrstuvwxyz{mno|}~p 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> experimentalunknownNone.8transform a list of ASN1 Events into a strict bytestring/6transform a list of ASN1 Events into a lazy bytestring./././  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone(Represent the events and state thus far..represent the parsing state of an ASN1 stream."the stack of constructed elements.the next expected type.the position in the stream.nothing means the parser stop this construction on an ASN1 end tag, otherwise specify the position where the construction terminate.-create a new empty parse state. position is 0run 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.cwhen no more input is available, it's important to check that the parser is in a finish state too.0LParse one lazy bytestring and returns on success all ASN1 events associated.1NParse one strict bytestring and returns on success all ASN1 events associated. parser stateinput data as bytes0101 01 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone  ./01  01/. BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalunknownNone2"Distinguished Encoding Rules (DER)4Basic Encoding Rules (BER)FDER header need to be all of finite size and of minimum possible size. 23456789:23454523 23456789:                   ! "#$%&'()*+,-./0123456789:;< = > ? @AABBCDEFGHIJKLMNOPQRSTUVWXUYZ[\]^_`Mabcdefghijklmnopqrstuvw x y z { | } ~                             *asn1-encoding-0.9.5-9w4TFvLCDTrJjV3qDKgpV9Data.ASN1.ObjectData.ASN1.BinaryEncoding.RawData.ASN1.StreamData.ASN1.ErrorData.ASN1.EncodingData.ASN1.BinaryEncodingData.ASN1.Internal Data.ASN1.GetData.ASN1.SerializeData.ASN1.PrimData.ASN1.BinaryEncoding.WriterData.ASN1.BinaryEncoding.Parse'asn1-types-0.3.2-666D9GcolNS7cz58NvfKztData.ASN1.TypesfromASN1toASN1 ASN1ObjectData.ASN1.Types.LowlevelPrivateContext Application Universal ASN1ClassASN1Tag LenIndefiniteLenLongLenShort ASN1Length ASN1HeaderConstructionEndConstructionBegin PrimitiveHeader ASN1EventASN1ReprgetConstructedEndgetConstructedEndRepr ASN1ErrorStreamUnexpectedEOCStreamInfinitePrimitiveStreamConstructionWrongSizeStreamUnexpectedSituationParsingHeaderFailParsingPartialTypeNotImplementedTypeDecodingFailedTypePrimitiveInvalid PolicyFailed$fExceptionASN1Error$fShowASN1Error $fEqASN1Error ASN1Encoding encodeASN1ASN1DecodingReprdecodeASN1Repr ASN1Decoding decodeASN1 decodeASN1'decodeASN1Repr' encodeASN1' toByteStringtoLazyByteStringparseLBSparseBSDERBER$fASN1EncodingDER$fASN1DecodingDER$fASN1DecodingReprDER$fASN1DecodingBER$fASN1DecodingReprBER uintOfBytes intOfBytes bytesOfInt bytesOfUIntputVarEncodingIntegralGetMoreResultFailbaseGHC.BaseStringPartialbytestring-0.10.8.1Data.ByteStringemptyDoneData.ByteString.Internal ByteString runGetPosensure ensureRec demandInput getBytesCopygetBytesunGetComplete IncompletePositionSuccessFailureBufferInputappend bufferBytesputfinalKfailKrunGetfailDescgetWord8$fMonadPlusGet $fMonadGet$fAlternativeGet$fApplicativeGet $fFunctorGet$fFunctorResult $fShowResult getHeaderparseFirstWord putHeader putLength getTagLong getLength getInteger getEnumerated getIntegerRawgetOIDASN1Ret encodeHeaderencodePrimitiveHeaderencodePrimitiveDataencodePrimitive encodeOne encodeListencodeConstructedmkSmallestLengthdecodePrimitive getBoolean getBitStringgetCharacterStringgetOctetStringgetNullgetTimeputTime putInteger putBitString putStringputOIDASN1ConstructionTypeSequenceSet ContainerASN1RealOIDBooleanIntVal BitString OctetStringNull Enumerated ASN1StringASN1TimeOtherStartEnd ParseCursor ParseStateConstructionEndAt newParseState runParseState isParseDone ParsePosition ParseExpect ExpectHeaderExpectPrimitiveisEOCasn1LengthToConst mplusEithercheckDERdecodeConstructiondecodeEventASN1Repr encodeToRaw