use of com.android.org.bouncycastle.asn1.DERSequence in project robovm by robovm.
the class AttributeCertificate method toASN1Primitive.
/**
* Produce an object suitable for an ASN1OutputStream.
* <pre>
* AttributeCertificate ::= SEQUENCE {
* acinfo AttributeCertificateInfo,
* signatureAlgorithm AlgorithmIdentifier,
* signatureValue BIT STRING
* }
* </pre>
*/
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(acinfo);
v.add(signatureAlgorithm);
v.add(signatureValue);
return new DERSequence(v);
}
use of com.android.org.bouncycastle.asn1.DERSequence in project robovm by robovm.
the class DHDomainParameters method toASN1Primitive.
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(this.p);
v.add(this.g);
v.add(this.q);
if (this.j != null) {
v.add(this.j);
}
if (this.validationParms != null) {
v.add(this.validationParms);
}
return new DERSequence(v);
}
use of com.android.org.bouncycastle.asn1.DERSequence in project robovm by robovm.
the class X9Curve method toASN1Primitive.
/**
* Produce an object suitable for an ASN1OutputStream.
* <pre>
* Curve ::= SEQUENCE {
* a FieldElement,
* b FieldElement,
* seed BIT STRING OPTIONAL
* }
* </pre>
*/
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
if (fieldIdentifier.equals(prime_field)) {
v.add(new X9FieldElement(curve.getA()).toASN1Primitive());
v.add(new X9FieldElement(curve.getB()).toASN1Primitive());
} else if (fieldIdentifier.equals(characteristic_two_field)) {
v.add(new X9FieldElement(curve.getA()).toASN1Primitive());
v.add(new X9FieldElement(curve.getB()).toASN1Primitive());
}
if (seed != null) {
v.add(new DERBitString(seed));
}
return new DERSequence(v);
}
use of com.android.org.bouncycastle.asn1.DERSequence in project robovm by robovm.
the class X9FieldID method toASN1Primitive.
/**
* Produce a DER encoding of the following structure.
* <pre>
* FieldID ::= SEQUENCE {
* fieldType FIELD-ID.&id({IOSet}),
* parameters FIELD-ID.&Type({IOSet}{@fieldType})
* }
* </pre>
*/
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(this.id);
v.add(this.parameters);
return new DERSequence(v);
}
use of com.android.org.bouncycastle.asn1.DERSequence in project robovm by robovm.
the class CertificateList method toASN1Primitive.
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(tbsCertList);
v.add(sigAlgId);
v.add(sig);
return new DERSequence(v);
}
Aggregations