private static byte[] toByteArray(ASN1Primitive obj) { try { return obj.getEncoded(); } catch (IOException e) { throw new IllegalArgumentException("Unable to encode object"); } }
private static byte[] toByteArray(ASN1Primitive obj) { try { return obj.getEncoded(); } catch (IOException e) { throw new IllegalArgumentException("Unable to encode object"); } }
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; }
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 InputStream getContentStream(ASN1Encodable encodable) throws IOException { byte[] encoded = encodable.toASN1Primitive().getEncoded(ASN1Encoding.DER); int index = 1; while ((encoded[index] & 0xff) > 127) { index++; } index++; return new ByteArrayInputStream(encoded, index, encoded.length - index); } }
public PrivateKeyInfo( AlgorithmIdentifier algId, ASN1Encodable privateKey, ASN1Set attributes) throws IOException { this.privKey = new DEROctetString(privateKey.toASN1Primitive().getEncoded(ASN1Encoding.DER)); this.algId = algId; this.attributes = attributes; }
/** * add a given extension field for the standard extensions tag (tag 3) * @throws IOException * @deprecated use method taking ASN1ObjectIdentifier */ public void addExtension( String OID, boolean critical, ASN1Encodable value) throws IOException { this.addExtension(OID, critical, value.toASN1Primitive().getEncoded()); }
public X509TrustedCertificateBlock(byte[] encoding) throws IOException { ASN1InputStream aIn = new ASN1InputStream(encoding); this.certificateHolder = new X509CertificateHolder(aIn.readObject().getEncoded()); this.trustBlock = new CertificateTrustBlock(aIn.readObject().getEncoded()); }
public X509TrustedCertificateBlock(byte[] encoding) throws IOException { ASN1InputStream aIn = new ASN1InputStream(encoding); this.certificateHolder = new X509CertificateHolder(aIn.readObject().getEncoded()); this.trustBlock = new CertificateTrustBlock(aIn.readObject().getEncoded()); }
public DERBitString( ASN1Encodable obj) throws IOException { super(obj.toASN1Primitive().getEncoded(ASN1Encoding.DER), 0); }
public DLBitString( ASN1Encodable obj) throws IOException { super(obj.toASN1Primitive().getEncoded(ASN1Encoding.DER), 0); }