--- Convert-BER-XS/XS.pm 2019/04/20 14:50:08 1.22 +++ Convert-BER-XS/XS.pm 2019/04/20 14:53:29 1.23 @@ -78,7 +78,7 @@ =head2 EXPORT TAGS AND CONSTANTS By default this module doesn't export any symbols, but if you don't want -to break your keyboard, editor or eyesigh with extreemly long names, I +to break your keyboard, editor or eyesight with extremely long names, I recommend importing the C<:all> tag. Still, you can selectively import things. @@ -86,12 +86,12 @@ =item C<:all> -All of the below. Really. Rcommended for at least first steps, or if you +All of the below. Really. Recommended for at least first steps, or if you don't care about a few kilobytes of wasted memory (and namespace). =item C<:const> -All of the stricly ASN.1-related constants defined by this module, the +All of the strictly ASN.1-related constants defined by this module, the same as C<:const_asn :const_index>. Notably, this does not contain C<:const_ber_type> and C<:const_snmp>. @@ -106,8 +106,8 @@ =item C<:const_asn> -ASN class values (these are C<0>, C<1>, C<2> and C<3>, reespectively - -exactly thw two topmost bits from the identifdier octet shifted 6 bits to +ASN class values (these are C<0>, C<1>, C<2> and C<3>, respectively - +exactly thw two topmost bits from the identifier octet shifted 6 bits to the right): ASN_UNIVERSAL ASN_APPLICATION ASN_CONTEXT ASN_PRIVATE @@ -171,7 +171,7 @@ Tags are simple integers, and ASN.1 defines a somewhat weird assortment of those - for example, you have 32 bit signed integers and 16(!) different -string types, but there is no unsigned32 type for example. Different +string types, but there is no Unsigned32 type for example. Different applications work around this in different ways, for example, SNMP defines application-specific Gauge32, Counter32 and Unsigned32, which are mapped to two different tags: you can distinguish between Counter32 and the @@ -186,6 +186,13 @@ [CLASS, TAG, CONSTRUCTED, DATA] +For example: + + [ASN_UNIVERSAL, ASN_INTEGER32, 0, 177] # the integer 177 + [ASN_UNIVERSAL, ASN_OCTET_STRING, 0, "john"] # the string "john" + [ASN_UNIVERSAL, ASN_OID, 0, "1.3.6.133"] # some OID + [ASN_UNIVERSAL, ASN_SEQUENCE, 1, [ [ASN_UNIVERSAL... # a sequencE + To avoid non-descriptive hardcoded array index numbers, this module defines symbolic constants to access these members: C, C, C and C.