úÎnėfd      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc unknown experimental#Vincent Hanquez <vincent@snarc.org> Safe-Inferedd/The Get monad is an Exception and State monad. eThe result of a parse. fThe parse succeeded. The g is the 6 input that had not yet been consumed (if any) when  the parse succeeded. h1Supply this continuation with more input so that 3 the parser can resume. To indicate that no more  input is available, use an i string. jThe parse failed. The k is the ) message describing the error, if any. lRun the Get monad applies a get&-based parser on the input ByteString m 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. nPull n/ bytes from the input, as a strict ByteString. doefhjlpmnqrstuvwx doefhjlpmnqdoejhflpmnqrstuvwx unknown experimental#Vincent Hanquez <vincent@snarc.org> Safe-Inferedy[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> Safe-Infered*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> Safe-Inferedparse an ASN1 header €@putIdentifier encode an ASN1 Identifier into a marshalled value €€€ unknown experimental#Vincent Hanquez <vincent@snarc.org> Safe-Infered)Represent the events and state thus far. ‚/represent the parsing state of an ASN1 stream. ƒ.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> Safe-Infered9transform 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> Safe-Infered   unknown experimental#Vincent Hanquez <vincent@snarc.org> Safe-Infered 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-Infered+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-Infered 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-Infered]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> Safe-Infered‡bgetInteger, 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> Safe-Infered`#Distinguished Encoding Rules (DER) bBasic Encoding Rules (BER) `abcĐŠŦŽ­`abcbc`a`abcĐŠŦŽ­Ū !"#$%&'( ) * + ,--../0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkllmm n o pqrs tquv wxyz { | } ~  €  ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ Ž   ‘ ’ “ ”•–—˜™š›œžŸ ĄĒĢĪĨͧĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―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 ASN1ObjecttoASN1fromASN1DERBERGetResultDonebytestring-0.9.2.1Data.ByteString.Internal ByteStringPartialData.ByteStringemptyFailbaseGHC.BaseString runGetPos getBytesCopygetBytesInputrunGetgetWord8$fMonadPlusGet $fMonadGet$fAlternativeGet$fApplicativeGet $fFunctorGet$fFunctorResult $fShowResult uintOfBytes intOfBytes bytesOfInt bytesOfUIntputVarEncodingIntegral$fExceptionASN1Error getHeader putHeader ParseCursor ParseState newParseState runParseState isParseDone$fExceptionBitArrayOutOfBound getIntegergetOID encodeHeaderencodePrimitiveHeaderencodePrimitive encodeOne encodeListencodeConstructedmkSmallestLengthdecodePrimitive getBoolean getBitStringgetOctetStringgetNumericStringgetPrintableString getUTF8String getT61StringgetVideoTexString getIA5StringgetGraphicStringgetVisibleStringgetGeneralStringgetUniversalStringgetCharacterString getBMPStringgetNull getUTCTimegetGeneralizedTime putUTCTimeputGeneralizedTime putInteger putBitString putStringputOID$fASN1EncodingDER$fASN1DecodingDER$fASN1DecodingReprDER$fASN1DecodingBER$fASN1DecodingReprBER