Files
boc/aamos-ledger-rust/target/debug/deps/libsimple_asn1-bc11de676529e93c.rmeta
T

219 lines
56 KiB
Plaintext
Raw Normal View History

rust
#rustc 1.96.0 (ac68faa20 2026-05-25)ÁÀ뉊]!ÜÛê(¹Þ—šên-5be7b69c3ff7b5b8ÁíàÄTËŸ ÜJîÄ)'ß\¥!-3d1337db07d0b3aeÁ¤²XctÔ'ÐÓ©z¨ɽÓ-a4945860e1c53b00Á¤°ð ¾ä-±($²ï=©Ã-7e98a21bfd32b0edÁòÖÀH•‘PIÓHã#£-055f30b747f859b6Árustc_std_workspace_coreÁ­Cçß^ò½èÝ$­Çÿ+Cé-c4878ee60b2242c9ÁŸÃï+Ñ]ŠqB<ÏïW#-8dd1dd90e70d0b6aÁ miniz_oxideÁ€š»J(P>àö÷g\K-1eb618da2918ab7fÁadler2ÁÆ;+Þ®5¥Ìýݰ¦ÛLˆ-f7919172d268e069Á hashbrownÁPäV9ÒÆèÜ"ÊÖVŽ\-0fc2184a5da6723aÁrustc_std_workspace_allocÁs&ØòØy¯s•bæ!‰ýŠ-97e4bf30be240674Á
std_detectÁhŠBîÙºÌI®ËÅš-9dbbf8346ba7ac8bÁrustc_demangleÁûë9´Ç×@Œ’ùXFº-f33013f239bf9f14Ácfg_ifÁÜLhž§Œaã¯>­-0a71c8f33a838301Á addr2lineÁ׎Þ!]8V$É@@-e618e6be60e87ba2ÁgimliÁ¸
°µ~Î1‹Ñt ðÁ€w-1f7768a68858f670ÁobjectÁ
áPÃ?­À¶¼QHJ¥-914cd6a4dbe590d1ÁmemchrÁ›º«8Ór­2Ù $¨ûib-cf21ca6f2bb15dcdÁë
‹ás«LÖ€îâƒ×ɯŒ-ee6f3747e38367f0Á
num_bigintÁƱ‘¡°¹ŽEŸü-%þä-1c9fb314b9c73ca9Á num_integerÁ¢úÍI™Ý@ià‹1Hæ²-7dc02ec4196ef545Á
num_traitsÁËßM6@eg^…RžºQ®–•-cec9984d90a4582aÁ thiserrorÁ´,-Uô!ÌÓ°™û½©|#§-9a017bdf1f6911cfÁthiserror_implÁ
²,v€ϸ6»˜-248901177889560cÁtimeÁ¬¬7Í #æUÝTÐhx-9db93fe7b180f52dÁ time_coreÁuqb•KäÖèŽíµ¸-15efa507e9592178ÁderangedÁy3Rø5"ì§„ƒ}¤æ-01d9b2f185808877Ánum_convÁ ¿Àñh¢A¶ÙqÒÁ-137791c09537c162ÁpowerfmtÁÕô¹wÄ·$„¥ƒ„‚„¯-dabe7b344a1502fbÁ time_macrosÁ¢ÒÝÊmÁ 6o·§ýAÙ-567fe938724ff7ebÁ
quickcheckÁT±  
KNOWN_TAGSÁTíX$àXtestsÁ,ܯ$ѯÀ 
  
classÁž
æ as_rawÁas_vecÁ'aÁ¥oidÁPRINTABLE_CHARSÁfrom_derÁ from_der_Á! ! ! ! 
decode_tagÁdecode_base127Á decode_classÁ
decode_lengthÁto_derÁencode_asn1_stringÁ
encode_tagÁencode_base127Á encode_classÁ
encode_lenÁFromASN1WithBodyÁ0ErrorÁ0from_asn1_with_bodyÁ2Ñ
FromASN1Á44 from_asn1Á7¥77:Ñ

der_decodeÁ<¥< ToASN1Á??to_asn1Á?
to_asn1_classÁ
der_encodeÁC¥ ASN1ClassÁE UniversalÁF
E ApplicationÁH
EContextSpecificÁJ
EPrivateÁL
OƒR× 
U ASN1BlockÁWBooleanÁX
XˆXWIntegerÁ\
\ˆ\W BitStringÁ`
`ˆ``ŠW OctetStringÁe
eˆeWNullÁi
iˆWObjectIdentifierÁl
lˆlW
UTF8StringÁp
pˆpWPrintableStringÁt
tˆtW
TeletexStringÁx
xˆxW IA5StringÁ|
|ˆ|WUTCTimeÁ
ˆWGeneralizedTimeÁ
ˆWUniversalStringÁˆ
ˆˆˆW BMPStringÁŒ
ŒˆŒWSequenceÁ
ˆWSetÁ
ˆWExplicitÁ˜
˜ˆ˜˜Š˜WUnknownÁž
žˆžžŠžžŒ ¥ƒ §×OIDÁ©
©ˆ
¬ƒ®×±³Ö
ASN1DecodeErrÁƒ¸×»×¼¿µ EmptyBufferÁÁ
µBadBooleanLengthÁÃ
ȵLengthTooLargeÁÆ
ƈµUTF8DecodeFailureÁÉ
ɈµPrintableStringDecodeFailureÁÌ
µInvalidDateValueÁÎ
ΈµInvalidBitStringLengthÁÑ
шµ InvalidClassÁÔ
Ôˆµ
IncompleteÁ×
µOverflowÁÙ

ASN1EncodeErrÁ܃Þ×á×äÛObjectIdentHasTooFewFieldsÁæ
ÛObjectIdentVal1TooLargeÁè
ÛObjectIdentVal2TooLargeÁê









!
&
&
'
'
)
)
*
+
,
-
2
6
:
<
A
B
C
P
S
S
S
V
V
¦
¨
¨
¨
­
¯
¯
¯
²
²
´
·
¹
¹
¹
¼
¼
¼
À
À
Ý
ß
ß
ß
â
â
â
å
å
04?ÛEFGüHIJK¦LMÀlÅýØ’!Š ’!¿c’!Ðì’!µß’!’!ØWXYZˆ[\]¯^ˆ_`aÏbˆcdŠeføgˆhijœkˆlm²nˆopqÛrˆstuþvˆwxy¦zˆ{|}Ì ~ˆî
ˆƒ ˆˆ¼ ŠˆŒç
ŽˆŒˆ°ˆ˜ÏšˆœŠžŸƒ ˆ¡¢Š£¤ŒØ½†§ª™¿c"µß""Ø©©ªÖ«ˆ Ò–Ì+ f¿cº'Ðìº'µßº'º'º'µß 8º'º'ص
ÁÂóÃÄňÆÇ°ÈˆÉÊÓˈÌÍùÎϢЈÑÒÇÓˆÔÕòÖˆ×ØÙÚª iÀ„0VuB¿c³(¾³(Äc³(Ðì³(µß³(³(ØÛæçèé²êëÖê\Ðò­¿cÝ*¾Ý*ÄcÝ*ÐìÝ*µßÝ*Ý*0¥NEO©µÜÛQER©¸µÞÛT©¾µãÛUE©
¿µäÛ³©ºµàÛ»µáÛ7۬؊  ¿cÐì µß#¾Äc0J L"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'()+,-./:=? "Á WY&"18>E<‰ W]&"1Ø.8ííBigIntÁîsignÁ,ïdataÁ,Z™É­­ [ Wa)"4Ø.;Ø.BªBªBö­BbufÁ÷<®B÷<9)
-ÜnLçEçEèEGlobalÁ ¿±‡§í#²¹ Wf&"1Ø.8Ó0?F Wj#".Ø.5<„ý Wm&"1Ø.8º'?F Wq&"1Ø.8úHúHßûHÁ‘4Ý­f‰úM÷jq Wu&"1Ø.84?F Wy&"1Ø.84?FL„ W }&"1Ø.84?F W
'"2Ø.9¤9¤9PrimitiveDateTimeÁ¥9Ç ç¦9dateÁ瘸bCŽÇ^§Œ W '"2Ø.9þ6@G W '"2Ø.94@G W
'"2Ø.94@G W'"2Ø.9ªBªBö­Bæ/÷<®B÷<9)
-ÜnL"“1}ß W'"2Ø.9ž:@G W -"8!?Ø.Fð ð BigUintÁñ Ú.+3z }žBoxÁ¡ˆˆ¢ˆl }.xÏ"“1ÊÑ W#Ÿ0";!BHØ.O<VÓ0]dtøB ©ª%º'0ªBªBö­Bæ/÷<®B÷<9)
-ÜnL<“1t{„ù[ µÄ%³(0Ø.7>tÒ\ µÇ%³(0Ø.7>Œ¨] µÊ%³(0ÅÏÅÏ Utf8ErrorÁÆÏ valid_up_toÁ¯vÇÏ error_lenÁ¯vlÅooÛÜ è„Ð^ µÏ%³(047>´ _ µÒ%³(07>dŒ` µÕ%³(017> !&'()*+,-./04<?CEW©ªµÛÀ¼.4É íœ;<Ñ ð 
FromPrimitiveÁlì ¥OneÁû Ó ToPrimitiveÁ\€  ZeroÁ$ Ä
í ð  ÃL š
À
ú?Lš
ÅÏ
ˆ6ŒÅ
¤9ì
ôVüÞ°üOL A small ASN.1 parsing library for Rust. In particular, this library is usedÁüPPM to translate the binary DER encoding of an ASN.1-formatted document into theÁü¡LI core primitives of ASN.1. It is assumed that you can do what you need toÁ from there.Áþúü‚PM The critical items for this document are the traits `ToASN1` and `FromASN1`.ÁüÓNK The first takes your data type and encodes it into a `Vec` of simple ASN.1Áü¢>; structures (`ASN1Block`s). The latter inverts the process.ÁáúüåLI Items that implement `ToASN1` can be used with the function `der_encode`Áü²JG to provide single-step encoding of a data type to binary DER encoding.ÁüýHE Similarly, items that are `FromASN` can be single-step decoded usingÁüÆ%" the helper function `der_decode`.ÁìúüðLI You can implement one or both traits, depending on your needs. If you doÁü½MJ implement both, the obvious encode/decode quickcheck property is stronglyÁd advised.Á˜úüœJG For decoding schemes that require the actual bytes associated with theÁüçJG binary representation, we also provide `FromASN1WithBody`. This can beÁü²JG used with the offset information in the primitive `ASN1Block`s to, forÁüý30 example, validate signatures in X509 documents.Á± úüµ NK Finally, this library supports ASN.1 class information. I'm still not sureÁü„
%" why it's useful, but there it is.Áª
úü®
MJ Please send any bug reports, patches, and curses to the GitHub repositoryÁüü
74 at <code>https://github.com/acw/simple_asn1</code>.Á !&'()*+,-./04<?CEW©ªµÛÀë¼.ìíœ;ëð CÝ¥¯CÙÓÅCÍ ãCÈÄ
íÇð ÆÃL šÅ À
ú?ÄÅÏÈ6¤9ì
ÁÝàã ÚÝÏÒ »¾«®¬Á y¼Ü mŒù aœ
U„©
H¼¿
;"üØ üíIF Get the class associated with the given ASN1Block, regardless of whatÁÄ» kind of block it is.Á,ßì ì"! å
ìŽ*ü™)KH Get the starting offset associated with the given ASN1Block, regardlessÁüé)  of what kind of block it is.Á4•*í í"Ø. œ*
$*ä›1"·ßü¾1'Á1îï î" ï" Ä1
$Å1¹
,Ë1D—Cº'üžD"ü¦CB? Generate an ASN.1. The vector should be in the obvious format,ÁüíC,) with each component going left-to-right.Á¥DÍ>º'
à ©DüòD6„ÝD
converts theÁ4ùDð ðº'Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
Ó0Ý* €E
$EüÀOU4ÇO Ñ
º'Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ªBªBö­Bæ/÷<®B÷<9)
-ÜnL¥“1³(Ñ
¥Íìˆ_ ÒOðˆ_ Ñ
<¤ÕO
Ñ
ˆ_$ïOÎO79ä³R8ññ (·ßôÖRÙRòó ò ( óº' ÜR
8$ÝRv2ÁãR„çVü—U@= A handy macro for generating OIDs from a sequence of `u64`s.ÁØUúüÜUA> Usage: oid!(1,2,840,113549,1,1,1) creates an OID that matchesÁüžV85 1.2.840.113549.1.1.1. (Coincidentally, this is RSA.)Á(|×Vž øV æW þV W, €W W ŒW, ƒW8° „W& …W8$‡W$ W
ŽW*’W •W ãW W âW,  W8,¡W'¦W8Ö¨W'«W8æ ­W °W ÜW8Á±W ´W µW ÛW, ¶W ·W ØW, ¸W8,¹W'¾W8œ;<ÀW'ÇW8÷$ÉW ÍW ×W, ÎW8° ÏW8ÑW8ÚÔW$ ÙW
ÚW% äWÜéW|ïW üÍeBüçdHE Translate a binary blob into a series of `ASN1Block`s, or provide anÁä°e error if it didn't work.ÁDÔeô ô
1Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ž:³( àe
´ Ýeü©fTL¬fõ õ½gØ.Ág ¹f
!´ ¶f start_offsetÁdÀfè‹!<closure_kind>Á"<closure_signature>Á"<upvars>Á""!" 1Õ‘!±h#Éh#æh##!#†j‰j˜jå”!±h$Éh$æh$$!$†j‰j˜jœ !±h%Éh%æh%%!%‡I‡I
FromUtf8ErrorÁˆIbytesÁ4‰IerrorÁ‘4fŠÀ¿Óí³(˜jüÁ°_Tİö÷ ö½g ÷Ø.Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
<!³( Ò°
&´ ϰÖ,Ù°üä´Ptç´øù ø½g ùØ.Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
<³( ù´
'´ ö´Ö,€µü‰¸:dŒ¸1Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
!³(
(´ ™¸üºMlźúû ú½g ûØ.Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
Ø.³( Öº
)´ ÓºÖ,ݺü‡Ã>ü•ÂKH Given an `ASN1Block`, covert it to its DER encoding, or return an errorÁüáÂ%" if something broke along the way.Á4ŽÃü ü"å\ ˜Ã
*´ •Ãüĉ}”ljý1’! ýå\ ˜Š
+tagÁ߉ force_charsÁ\쉮 ƒŠ¾ •ŠüáŽFTäŽþ! þ’<Ó0 
,® ïŽ constructedÁ\ýŽ¿ üï’)tò’ÿ ÿ’<Ó0 „“
-Á üÒ—#dÕ—!1
.® â—üÉ™"TÌ™Ø.Ó0
/à יü®Ÿ!üŽžJG A trait defining types that can be decoded from an `ASN1Block` stream,ÁüÙžHE assuming they also have access to the underlying bytes making up theÁ\¢Ÿ stream.Á„¸Ÿ00Íì,ÊŸ0©y©y1212Íì±y1üÖŸ éây³(œâŸÚyòy
2üÖŸ,ÛŸ00üüŸœÿŸ3 3
" ½gÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
±y×zây0“ 0
2±yÁ   _bÁ¼ $&ÌÍ¢ü¡JG A trait defining types that can be decoded from an `ASN1Block` stream.ÁüÌ¡>; Any member of this trait is also automatically a member ofÁü‹¢A> `FromASN1WithBody`, as it can obviously just ignore the body.ÁD×¢44©y,á¢4©y©y5656Íì±y5üí¢ é³~³(œù¢«~Ã~
6üí¢,ò¢44ü“£KL–£ ßzÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
±y£³~4 ££4
6±yÁ  £üâ£(¥88Íìà+ ç£4à+Dê£à+9:12:$&T‘¤,–¤77à+5ü­¤zœ°¤; ;ßz ½gÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
à+Î7Ĥ7
:à+Á Ѥìzí¤"$üɦGüË¥HE Automatically decode a type via DER encoding, assuming that the typeÁü”¦41 is a member of `FromASN1` or `FromASN1WithBody`.ÁTЦƒ ƒ½gÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
à+à+1¥== ó¦È€ Û¦0à+„Þ¦
<à+Á ð¦$&DÕ§<±h>Éh>æh>><>à+ˆlà+ ßzà+˜j„ªüä§EB The set of types that can automatically converted into a sequenceÁüª¨DA of `ASN1Block`s. You should probably use to_asn1() but implementÁüï¨HE to_asn1_class(). The former has a default implementation that passesÁü¸©FC `ASN1Class::Universal` as the tag to use, which should be good forÁ„ÿ©
most people.Á4šª??Îì±yüª?ĉĉ @AB@ABÍì±y@ü§ª éŠÝ*œ³ªù‰‘ŠABü§ª,¬ª??üͪ8<Ъ ±yÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ž:Š? ت?
A±y$ÙªüëMlÆ« ±y’!„‹? Ô«?
B±y$Õ«® Û«ü†­@ü”¬FC Automatically encode a type into binary via DER encoding, assumingÁüÛ¬*' that the type is a member of `ToASN1`.ÁT­ à+Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
Ó0à+@¥DD ¦­È€ ˜­?à+4›­
Cà+Á £­$&”‹ÌÙ
 An ASN.1 block class.Áó
úü÷
KH I'm not sure if/when these are used, but here they are in case you wantÁôÃ to do something with them.ÁL”!lÅýFGHIJKLMGIKMEE!EE!\³EE!EE!|ÄEE!EE!<ÙEE!EE!(ë
!/3!PÙPKM ’!’!OëO
P“ ò!(
ø!SÀcS!ˆŠ ˆ’!  c cˆ¢cµ
 `£cæ/ `àB¤GS
ŠÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
˜jŸÈŸÈ È O˜éBLR
øR