On Wed, 11 Sep 2002, Pino Roberto wrote: > Hi, > I would like to know if it's possible with ASN.1, use different lenght > encodings for structure in the same file. > For example, is possible encoding a structure with indefinite lenght > encoding and another (may be a substructure of the first one) with definite > lenght encoding?
Yes, with BER the encoder is free to choose either definite or indefinite length encodings. Of course, if an application profile dictates that only one or the other must be used, then you are obliged to use the specified one. > And if it's possibile, how can the encoder recognize structures to be > encoded with definite lenght encoding from structures with indefinite > lenght encoding? Is there any ASN.1 tag to use? Thanks, bye, Roberto I take it that you meant to say "how can the decoder ...". Yes? If yes, it can tell whether definite or indefinite length encoding was used based on whether the length field has a value of hex 80. If no, check with the provider of the tool that you are using. ------------------------------------------------------------------------- Bancroft Scott Toll Free :1-888-OSS-ASN1 OSS Nokalva International:1-732-302-0750 [EMAIL PROTECTED] Tech Support :1-732-302-9669 x-1 1-732-302-9669 x-200 Fax :1-732-302-0023 http://www.oss.com
