new DERTaggedObject( false, GeneralName.otherName, new DERSequence(
public RecipientInfo( KeyAgreeRecipientInfo info) { this.info = new DERTaggedObject(false, 1, info); }
public RecipientInfo( PasswordRecipientInfo info) { this.info = new DERTaggedObject(false, 3, info); }
public ASN1Primitive toASN1Primitive() { if (tstEvidence != null) { return new DERTaggedObject(false, 0, tstEvidence); } return null; } }
public RecipientIdentifier( ASN1OctetString id) { this.id = new DERTaggedObject(false, 0, id); }
public SMIMEEncryptionKeyPreferenceAttribute( RecipientKeyIdentifier rKeyId) { super(SMIMEAttributes.encrypKeyPref, new DERSet(new DERTaggedObject(false, 1, rKeyId))); }
private void addOptional(ASN1EncodableVector v, int tagNo, ASN1Encodable obj) { if (obj != null) { v.add(new DERTaggedObject(true, tagNo, obj)); } } }
private void addOptional(ASN1EncodableVector v, int tagNo, ASN1Encodable obj) { if (obj != null) { v.add(new DERTaggedObject(true, tagNo, obj)); } } }
private void addOptional(ASN1EncodableVector v, int tagNo, ASN1Encodable obj) { if (obj != null) { v.add(new DERTaggedObject(true, tagNo, obj)); } } }
private void addOptional(ASN1EncodableVector v, int tagNo, ASN1Encodable obj) { if (obj != null) { v.add(new DERTaggedObject(true, tagNo, obj)); } } }
private void addOptional(ASN1EncodableVector v, int tagNo, ASN1Encodable obj) { if (obj != null) { v.add(new DERTaggedObject(true, tagNo, obj)); } } }
private void addOptional(ASN1EncodableVector v, int tagNo, ASN1Encodable obj) { if (obj != null) { v.add(new DERTaggedObject(true, tagNo, obj)); } } }
@Override public ASN1Primitive toASN1Primitive() { DERTaggedObject signatureInfoEncodable = signatureInfo .map(e -> new DERTaggedObject(SIGNATURE_INFO, e)) .orElseGet(null); DERTaggedObject signatureEncodable = signature .map(e -> new DERTaggedObject(SIGNATURE, e)) .orElseGet(null); ASN1EncodableVector vector = DER.vector(signatureInfoEncodable, signatureEncodable); return new DERSequence(vector); }
/** * Add optional text. * * @param text optional agreed text to add to the MAC. * @return the current builder instance. */ public Builder withText(byte[] text) { this.text = DerUtil.toByteArray(new DERTaggedObject(false, 0, DerUtil.getOctetString(text))); return this; }
@Override public ASN1Primitive toASN1Primitive() { DERTaggedObject cont0Encodable = cont0() .map(DEROctetString::new) .map(e -> new DERTaggedObject(CONT0, e)) .orElseGet(null); ASN1EncodableVector vector = DER.vector( new ASN1Integer(x), DER.toSet(encryptedKeySet), cont0Encodable); return new DERSequence(vector); }
public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(certId); v.add(new DERTaggedObject(0, certValue)); return new DERSequence(v); } }
public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DEROctetString(encryptedKey)); if (maskKey != null) { v.add(new DERTaggedObject(false, 0, new DEROctetString(encryptedKey))); } v.add(new DEROctetString(macKey)); return new DERSequence(v); } }
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector vector = new ASN1EncodableVector(); vector.add(new DERUTF8String(control.getLabel())); byte[] id = control.getId(); if (id != null) { vector.add(new DERTaggedObject(0, new DEROctetString(id))); } return new DERSequence(vector); }
@Override public ASN1Primitive toASN1Primitive() { ASN1EncodableVector vector = new ASN1EncodableVector(); vector.add(new DERUTF8String(control.getLabel())); byte[] id = control.getId(); if (id != null) { vector.add(new DERTaggedObject(0, new DEROctetString(id))); } return new DERSequence(vector); }
private static byte[] buildOCSPResponse(byte[] BasicOCSPResponse) throws IOException { DEROctetString doctet = new DEROctetString(BasicOCSPResponse); ASN1EncodableVector v2 = new ASN1EncodableVector(); v2.add(OCSPObjectIdentifiers.id_pkix_ocsp_basic); v2.add(doctet); ASN1Enumerated den = new ASN1Enumerated(0); ASN1EncodableVector v3 = new ASN1EncodableVector(); v3.add(den); v3.add(new DERTaggedObject(true, 0, new DERSequence(v2))); DERSequence seq = new DERSequence(v3); return seq.getEncoded(); }