/** * Create a base ASN.1 object from a byte stream. * * @param data the byte stream to parse. * @return the base ASN.1 object represented by the byte stream. * @exception IOException if there is a problem parsing the data, or parsing the stream did not exhaust the available data. */ public static ASN1Primitive FromByteArray(byte[] data) { Asn1InputStream aIn = new Asn1InputStream(data); try { ASN1Primitive o = (ASN1Primitive)aIn.ReadObject(); return(o); } catch (ClassCastException) { throw new IOException("cannot recognise object in stream"); } }
/** * Equality (similarity) comparison for two ASN1Primitive objects. */ public abstract bool Asn1Equals(ASN1Primitive o);