Ed Day wrote: > > Please note that this response is *not* correct. Others on the topic have > been. > > The bytes 84 01 2E indicate a length field of 4 octets when in fact only two > are present. The correct bytes are 82 01 2E. > > Also it is not necessary to use indefinite length form for lengths larger > than two octets.
And indeed, you cannot do so unless the contents octets are TLV. In particular, indefinte length can be used for SEQUENCE and SEQUENCE OF, and for a fragmented octet string or bit string, but not for an integer. John L > Regards, > > Ed Day > Principal Engineer > Objective Systems, Inc. > [EMAIL PROTECTED] > (484) 875-3020 (main) > (610) 608-4930 (mobile) > (610) 321-0361 (fax) > (877) 307-6855 (toll-free) > > ----- Original Message ----- > From: "Salai Sivamal.G" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, February 01, 2002 7:45 AM > Subject: Re: [ASN.1] Length octets > > > Thanks Rahul > > > > -salai > > > > ----- Original Message ----- > > From: <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Friday, February 01, 2002 12:37 PM > > Subject: [ASN.1] Length octets > > > > > > > > > > > > > > > > Hi Salai, > > > > > > Please find my comments below. > > > > > > Regards, > > > Rahul > > > Hughes Software System > > > > > > > > > >Hi all, > > > > > > > >I have a doubt regarding Length octets in BER. > > > >My question is, How to specify length octets, if it's value is greater > > than > > > >'255'. > > > >Because we cannot specify it in a single octet. > > > > > > > >For Example, > > > >I want to specify a Length value as '302'. > > > >Can i specify it in two octets, in this case value will be 01 2E. > > > > > > > [Rahul] The Encoded String will be > > > [Rahul] T = some value > > > [Rahul] L = 84 01 2E > > > [Rahul] V = some value > > > [Rahul] This is actually Long Definite Form of encoding Lengths > > > [Rahul] which is used to encoded value octets between [0 - (256^126 -1)] > > > [Rahul] Beyond this Long Indefinite form is used. > > > > > > > >T = some value > > > >L = 01 2E > > > >V = some value > > > > > > > >while interpreting, the boundry between L and V is not very clear. > > > >My mistaken, there is a chance to read only '01' as length and 2E as > > value. > > > > > > > >how to avoid this ? > > > > > > > >It would be really helpful for me if somebady tells the answer. > > > > > > > >Thanks in advance. > > > > > > > >-Salai.g > > > >www.icope.com > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > "DISCLAIMER: This message is proprietary to Hughes Software Systems > > Limited > > > (HSS) and is intended solely for the use of the individual to whom it > is > > > addressed. It may contain privileged or confidential information and > > should > > > not be circulated or used for any purpose other than for what it is > > intended. If > > > you have received this message in error, please notify the originator > > > immediately. If you are not the intended recipient, you are notified > that > > you > > > are strictly prohibited from using, copying, altering, or disclosing the > > > contents of this message. HSS accepts no responsibility for loss or > damage > > > arising from the use of the information transmitted by this email > > including > > > damage from virus." > > > > > > > > > > > > > > > > > > > > > > > > -- Prof John Larmouth Larmouth T&PDS Ltd (Training and Protocol Development Services) 1 Blueberry Road Bowdon [EMAIL PROTECTED] Cheshire WA14 3LS Tel: +44 161 928 1605 England Fax: +44 161 928 8069
