/** * return an Octet string from a tagged object. * * @param obj the tagged object holding the object we want. * @param explicitly true if the object is meant to be explicitly * tagged false otherwise. * @exception ArgumentException if the tagged object cannot * be converted. */ public static Asn1OctetString GetInstance( Asn1TaggedObject obj, bool isExplicit) { Asn1Object o = obj.GetObject(); if (isExplicit || o is Asn1OctetString) { return(GetInstance(o)); } return(BerOctetString.FromSequence(Asn1Sequence.GetInstance(o))); }