{pd      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc unknown experimental#Vincent Hanquez <vincent@snarc.org>None d/The Get monad is an Exception and State monad. e"Have we read all available input? fThe result of a parse. gThe parse succeeded. The h is the 6 input that had not yet been consumed (if any) when  the parse succeeded. i1Supply this continuation with more input so that 3 the parser can resume. To indicate that no more  input is available, use an j string. kThe parse failed. The l is the ) message describing the error, if any. mRun the Get monad applies a get&-based parser on the input ByteString n If at least n2 bytes of input are available, return the current  input, otherwise fail. o If at least n2 bytes of input are available, return the current  input, otherwise fail. p$Immediately demand more input via a i continuation  result. q 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. rPull n/ bytes from the input, as a strict ByteString. $dsteuvwxyz{fgik|}~mnopqr d{fgikmqrdstevuwxyz{fkig|}~mnopqr unknown experimental#Vincent Hanquez <vincent@snarc.org> Safe-Inferred[uintOfBytes returns the number of bytes and the unsigned integer represented by the bytes 7intOfBytes 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 unknown 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. -represent one event from an asn1 data stream Constructed value end Constructed value start  Primitive  ASN1 Header >ASN1 Header with the class, tag, constructed flag and length. 'ASN1 Length with all different formats DLength is indefinite expect an EOC in the stream to finish the type Long form of N bytes 0Short form with only one byte. length has to be < 127.  ASN1 Tag Element class          unknown experimental#Vincent Hanquez <vincent@snarc.org>Noneparse an ASN1 header "Parse the first word of an header @putIdentifier encode an ASN1 Identifier into a marshalled value .putLength encode a length into a ASN1 length. ) - see getLength for the encoding rules  unknown experimental#Vincent Hanquez <vincent@snarc.org>None)Represent the events and state thus far. /represent the parsing state of an ASN1 stream. 3nothing means the parser stop this construction on 1 an ASN1 end tag, otherwise specify the position # where the construction terminate. .create a new empty parse state. position is 0 3run 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. #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.  parser state input data as bytes   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>None   unknown experimental#Vincent Hanquez <vincent@snarc.org> Safe-Inferred represent a bitarray / bitmap !2throwed in case of out of bounds in the bitarray. #,returns the length of bits in this bitarray $get the nth bits %'set the nth bit to the value specified &set the nth bits 'clear the nth bits (&get padded bytestring of the bitarray )+number of bit to skip at the end (padding)  !"#$%&'()  !"#$%&'()  !"#$%&'()  !"#$%&'()unknown experimental#Vincent Hanquez <vincent@snarc.org> Safe-Inferred+Define high level ASN1 object. EDefine the type of container !*+,-./0123456789:;<=>?@ABCDEFGHIJ'*+,-./0123456789:;<=>?@ABCDEFGHIJ'+DCBA@?>=<;:9876543210/.-,*EHGFIJ*+DCBA@?>=<;:9876543210/.-,EHGFIJunknown experimental#Vincent Hanquez <vincent@snarc.org> Safe-Inferred KJDescribe an ASN1 encoding, that transform an asn1stream into a bytestream L'encode a stream into a lazy bytestring Mtransition class. N-decode a lazy bytestring into an ASN1 stream OJDescribe an ASN1 decoding, that transform a bytestream into an asn1stream P-decode a lazy bytestring into an ASN1 stream Q/decode a strict bytestring into an ASN1 stream R3decode a strict bytestring into an ASN1Repr stream S)encode a stream into a strict bytestring KLMNOPQRS KLMNOPQRS OPMNKLQRSKLMNOPQRSunknown experimental#Vincent Hanquez <vincent@snarc.org>None TParse ASN1 Monad UXrun the parse monad over a stream and returns the result and the remaining ASN1 Stream. V:run the parse monad over a stream and returns the result. W!get next element from the stream XAget next container of specified type and return all its elements YErun a function of the next elements of a container of specified type Z+just like getNextContainer, except it doesn''t throw an error if the container doesn' t exists. [*just like onNextContainer, except it doens''t throw an error if the container doesn' t exists. \returns if there's more elements in the stream. TUVWXYZ[\ TUVWXYZ[\ TUVY[XZW\ TUVWXYZ[\unknown experimental#Vincent Hanquez <vincent@snarc.org> Safe-Inferred]2an object that can be marshalled from and to ASN1 ^)transform an object into an ASN1 stream. _:returns either an object along the remaining ASN1 stream,  or an error. ]^_]^_]^_]^_unknown experimental#Vincent Hanquez <vincent@snarc.org>NonebgetInteger, parse a value bytestring and get the integer out of the two complement encoded bytes return an OID (@+,-./0123456789:;<=>?@ABCDEFGH(unknown experimental#Vincent Hanquez <vincent@snarc.org>None`#Distinguished Encoding Rules (DER) bBasic Encoding Rules (BER) GDER header need to be all of finite size and of minimum possible size. `abc`abcbc`a `abc !"#$%&'( ) * + ,--../0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkllmm n o p qrst urvw xyz{ | } ~  n                asn1-data-0.7.1Data.ASN1.TypesData.ASN1.BinaryEncoding.RawData.ASN1.BitArrayData.ASN1.StreamData.ASN1.EncodingData.ASN1.ParseData.ASN1.ObjectData.ASN1.BinaryEncoding Data.ASN1.GetData.ASN1.InternalData.ASN1.SerializeData.ASN1.BinaryEncoding.ParseData.ASN1.BinaryEncoding.WriterData.ASN1.Prim ASN1Error PolicyFailedTypeDecodingFailedTypeNotImplementedParsingPartialParsingHeaderFailStreamUnexpectedSituationStreamConstructionWrongSizeStreamInfinitePrimitiveStreamUnexpectedEOC ASN1EventConstructionEndConstructionBegin PrimitiveHeader ASN1Header ASN1Length LenIndefiniteLenLongLenShortASN1Tag ASN1ClassPrivateContext Application UniversalparseLBSparseBS toByteStringtoLazyByteStringBitArrayBitArrayOutOfBoundbitArrayLengthbitArrayGetBitbitArraySetBitValuebitArraySetBitbitArrayClearBitbitArrayGetData toBitArrayASN1ReprASN1EndStartOther BMPStringCharacterStringUniversalString GeneralString VisibleString GraphicStringGeneralizedTimeUTCTime IA5StringVideoTexString T61StringPrintableString NumericString UTF8String EnumeratedRealOIDNull OctetString BitStringIntValBooleanASN1ConstructionType ContainerSetSequencegetConstructedEndgetConstructedEndRepr ASN1Encoding encodeASN1ASN1DecodingReprdecodeASN1Repr ASN1Decoding decodeASN1 decodeASN1'decodeASN1Repr' encodeASN1' ParseASN1runParseASN1State runParseASN1getNextgetNextContaineronNextContainergetNextContainerMaybeonNextContainerMaybehasNext ASN1ObjecttoASN1fromASN1DERBERGetMoreResultDonebytestring-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$fExceptionASN1Error getHeaderparseFirstWord putHeader putLength getTagLong getLength ParseCursor ParseStateConstructionEndAt newParseState runParseState isParseDone ParseExpectExpectPrimitive ExpectHeaderisEOCasn1LengthToConst mplusEitherbitArrayOutOfBound$fExceptionBitArrayOutOfBoundPrunP getIntegergetOIDASN1Ret encodeUCS2BE decodeUCS2BE encodeHeaderencodePrimitiveHeaderencodePrimitiveDataencodePrimitive encodeOne encodeListencodeConstructedmkSmallestLengthdecodePrimitive getBoolean getBitString getStringgetOctetStringgetNumericStringgetPrintableString getUTF8String getT61StringgetVideoTexString getIA5StringgetGraphicStringgetVisibleStringgetGeneralStringgetUniversalStringgetCharacterString getBMPStringgetNull getUTCTimegetGeneralizedTimeputTime putUTCTimeputGeneralizedTime putInteger putBitString putStringputOIDcheckDERdecodeConstructiondecodeEventASN1Repr encodeToRaw$fASN1EncodingDER$fASN1DecodingDER$fASN1DecodingReprDER$fASN1DecodingBER$fASN1DecodingReprBER