use of com.github.zhenwei.core.asn1.ASN1EncodableVector in project XobotOS by xamarin.
the class ObjectDigestInfo method toASN1Object.
/**
* Produce an object suitable for an ASN1OutputStream.
*
* <pre>
*
* ObjectDigestInfo ::= SEQUENCE {
* digestedObjectType ENUMERATED {
* publicKey (0),
* publicKeyCert (1),
* otherObjectTypes (2) },
* -- otherObjectTypes MUST NOT
* -- be used in this profile
* otherObjectTypeID OBJECT IDENTIFIER OPTIONAL,
* digestAlgorithm AlgorithmIdentifier,
* objectDigest BIT STRING
* }
*
* </pre>
*/
public DERObject toASN1Object() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(digestedObjectType);
if (otherObjectTypeID != null) {
v.add(otherObjectTypeID);
}
v.add(digestAlgorithm);
v.add(objectDigest);
return new DERSequence(v);
}
use of com.github.zhenwei.core.asn1.ASN1EncodableVector in project XobotOS by xamarin.
the class PolicyInformation method toASN1Object.
/*
* PolicyInformation ::= SEQUENCE {
* policyIdentifier CertPolicyId,
* policyQualifiers SEQUENCE SIZE (1..MAX) OF
* PolicyQualifierInfo OPTIONAL }
*/
public DERObject toASN1Object() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(policyIdentifier);
if (policyQualifiers != null) {
v.add(policyQualifiers);
}
return new DERSequence(v);
}
use of com.github.zhenwei.core.asn1.ASN1EncodableVector in project XobotOS by xamarin.
the class RSAPublicKeyStructure method toASN1Object.
/**
* This outputs the key in PKCS1v2 format.
* <pre>
* RSAPublicKey ::= SEQUENCE {
* modulus INTEGER, -- n
* publicExponent INTEGER, -- e
* }
* </pre>
* <p>
*/
public DERObject toASN1Object() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(new DERInteger(getModulus()));
v.add(new DERInteger(getPublicExponent()));
return new DERSequence(v);
}
use of com.github.zhenwei.core.asn1.ASN1EncodableVector in project XobotOS by xamarin.
the class CertBag method toASN1Object.
public DERObject toASN1Object() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(certId);
v.add(new DERTaggedObject(0, certValue));
return new DERSequence(v);
}
use of com.github.zhenwei.core.asn1.ASN1EncodableVector in project XobotOS by xamarin.
the class CertificationRequest method toASN1Object.
public DERObject toASN1Object() {
// Construct the CertificateRequest
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(reqInfo);
v.add(sigAlgId);
v.add(sigBits);
return new DERSequence(v);
}
Aggregations