boolean asn1Equals(DERObject o) { if (!(o instanceof ASN1Set)) { return false; } ASN1Set other = (ASN1Set) o; if (this.size() != other.size()) { return false; } Enumeration s1 = this.getObjects(); Enumeration s2 = other.getObjects(); while (s1.hasMoreElements()) { DEREncodable obj1 = getNext(s1); DEREncodable obj2 = getNext(s2); DERObject o1 = obj1.getDERObject(); DERObject o2 = obj2.getDERObject(); if (o1 == o2 || o1.equals(o2)) { continue; } return false; } return true; }
/** @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object o) { if ((o == null) || !(o instanceof DEREncodable)) { return false; } DEREncodable other = (DEREncodable) o; return this.getDERObject().equals(other.getDERObject()); }
@DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 13:00:13.235 -0500", hash_original_method = "F960A8D6AB2284319611CDCB2C711139", hash_generated_method = "EE8B736B4410D150BFC4C54E67862943") public BERConstructedOctetString(DEREncodable obj) { super(obj.getDERObject()); }
public void writeObject(Object obj) throws IOException { if (obj == null) { writeNull(); } else if (obj instanceof DERObject) { ((DERObject) obj).encode(this); } else if (obj instanceof DEREncodable) { ((DEREncodable) obj).getDERObject().encode(this); } else { throw new IOException("object not ASN1Encodable"); } }
public DERApplicationSpecific(boolean explicit, int tag, DEREncodable object) throws IOException { byte[] data = object.getDERObject().getDEREncoded(); this.isConstructed = explicit; this.tag = tag; if (explicit) { this.octets = data; } else { int lenBytes = getLengthOfLength(data); byte[] tmp = new byte[data.length - lenBytes]; System.arraycopy(data, lenBytes, tmp, 0, tmp.length); this.octets = tmp; } }
public BERConstructedOctetString(DEREncodable obj) { super(obj.getDERObject()); }
public void addObject(DEREncodable object) throws IOException { object.getDERObject().encode(new BEROutputStream(_out)); }