use of com.github.zhenwei.core.asn1.BERSequence in project XobotOS by xamarin.
the class ContentInfo method toASN1Object.
/**
* Produce an object suitable for an ASN1OutputStream.
* <pre>
* ContentInfo ::= SEQUENCE {
* contentType ContentType,
* content
* [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
* </pre>
*/
public DERObject toASN1Object() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(contentType);
if (content != null) {
v.add(new BERTaggedObject(0, content));
}
return new BERSequence(v);
}
use of com.github.zhenwei.core.asn1.BERSequence in project XobotOS by xamarin.
the class EncryptedData method toASN1Object.
public DERObject toASN1Object() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(new DERInteger(0));
v.add(data);
return new BERSequence(v);
}
use of com.github.zhenwei.core.asn1.BERSequence in project robovm by robovm.
the class ContentInfo method toASN1Primitive.
/**
* Produce an object suitable for an ASN1OutputStream.
* <pre>
* ContentInfo ::= SEQUENCE {
* contentType ContentType,
* content
* [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
* </pre>
*/
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(contentType);
if (content != null) {
v.add(new BERTaggedObject(true, 0, content));
}
if (isBer) {
return new BERSequence(v);
} else {
return new DLSequence(v);
}
}
use of com.github.zhenwei.core.asn1.BERSequence in project robovm by robovm.
the class EncryptedData method toASN1Primitive.
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(new ASN1Integer(0));
v.add(data);
return new BERSequence(v);
}
use of com.github.zhenwei.core.asn1.BERSequence in project robovm by robovm.
the class Pfx method toASN1Primitive.
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(new ASN1Integer(3));
v.add(contentInfo);
if (macData != null) {
v.add(macData);
}
return new BERSequence(v);
}
Aggregations