Hello Magda, The constraints are not used by BER but the encoder should validate the type is correct before encoding it. In that situation, the type is equivalent to externalAddress [0] IMPLICIT OCTET STRING (SIZE( 1 .. 9 )) (intersection of constraints).
And if you need to encode the value '010203'H in BER, this would simply be : 80 03 010203 80 is the encoding of the [0] IMPLICIT tag. I hope this helps, Bruno KONIK - uniGone > -----Message d'origine----- > De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De > la part de [EMAIL PROTECTED] > Envoyé : mercredi 10 mai 2006 16:36 > À : [email protected] > Objet : [ASN1] Octet string of 2 size constraints > > > Hi, > > > I have a problem with the following ASN.1 extract (from ETSI > TS 124 080 V5.5.0 (2004-12)): > > > externalAddress [0] IMPLICIT OCTET STRING ( SIZE( 1 .. 20 ) > ) ( SIZE( > > 1 .. 9 ) ) > > > > How to encode such thing in BER? > > > Best regards, > > Magda > > > > > _______________________________________________ > ASN1 mailing list > [email protected] > http://lists.asn1.org/mailman/listinfo/asn1 > -------------------------------------------------------------- > ------------------------- > Wanadoo vous informe que cet e-mail a ete controle par > l'anti-virus mail. > Aucun virus connu a ce jour par nos services n'a ete detecte. > > > _______________________________________________ ASN1 mailing list [email protected] http://lists.asn1.org/mailman/listinfo/asn1
