public ASN1Primitive toASN1Primitive() { return obj.toASN1Primitive(); } }
/** * Produce an object suitable for an ASN1OutputStream. */ public ASN1Primitive toASN1Primitive() { return id.toASN1Primitive(); } }
public BERConstructedOctetString( ASN1Encodable obj) { this(obj.toASN1Primitive()); }
public ASN1Primitive toASN1Primitive() { return obj.toASN1Primitive(); } }
public BERConstructedOctetString( ASN1Encodable obj) { this(obj.toASN1Primitive()); }
public ASN1Primitive toASN1Primitive() { return obj.toASN1Primitive(); } }
private byte[] getDEREncoded( ASN1Encodable obj) { try { return obj.toASN1Primitive().getEncoded(ASN1Encoding.DER); } catch (IOException e) { throw new IllegalArgumentException("cannot encode object added to SET"); } }
/** * Constructor from the encoding of an ASN.1 object. * * @param obj the object to be encoded. */ public DEROctetString( ASN1Encodable obj) throws IOException { super(obj.toASN1Primitive().getEncoded(ASN1Encoding.DER)); }
private byte[] encodeObj( ASN1Encodable obj) throws IOException { if (obj != null) { return obj.toASN1Primitive().getEncoded(); } return null; } }
private byte[] encodeObj( ASN1Encodable obj) throws IOException { if (obj != null) { return obj.toASN1Primitive().getEncoded(); } return null; }
private byte[] encodeObj( ASN1Encodable obj) throws IOException { if (obj != null) { return obj.toASN1Primitive().getEncoded(); } return null; }
private byte[] encodeObj( ASN1Encodable obj) throws IOException { if (obj != null) { return obj.toASN1Primitive().getEncoded(); } return null; }
private byte[] encodeObj( ASN1Encodable obj) throws IOException { if (obj != null) { return obj.toASN1Primitive().getEncoded(); } return null; }
private byte[] encodeObj( ASN1Encodable obj) throws IOException { if (obj != null) { return obj.toASN1Primitive().getEncoded(); } return null; } }
private byte[] encodeObj( ASN1Encodable obj) throws IOException { if (obj != null) { return obj.toASN1Primitive().getEncoded(); } return null; }
public void writeObject( ASN1Encodable obj) throws IOException { if (obj != null) { obj.toASN1Primitive().encode(this); } else { throw new IOException("null object detected"); } }
/** * dump out a DER object as a formatted string * * @param obj the ASN1Primitive to be dumped out. */ public static String dumpAsString( ASN1Encodable obj) { StringBuffer buf = new StringBuffer(); _dumpAsString("", false, obj.toASN1Primitive(), buf); return buf.toString(); } }
int encodedLength() throws IOException { int length = 0; for (Enumeration e = getObjects(); e.hasMoreElements();) { length += ((ASN1Encodable)e.nextElement()).toASN1Primitive().encodedLength(); } return 2 + length + 2; }
int encodedLength() throws IOException { int length = 0; for (Enumeration e = getObjects(); e.hasMoreElements();) { length += ((ASN1Encodable)e.nextElement()).toASN1Primitive().encodedLength(); } return 2 + length + 2; }
public byte[] getCertHash() { if (otherCertHash.toASN1Primitive() instanceof ASN1OctetString) { // SHA-1 return ((ASN1OctetString)otherCertHash.toASN1Primitive()).getOctets(); } else { return DigestInfo.getInstance(otherCertHash).getDigest(); } }