Java 类org.bouncycastle.asn1.BERTaggedObject 实例源码

项目:ipack    文件:ContentInfo.java   
/**
 * 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);
    }
}
项目:ipack    文件:CMSSignedDataParser.java   
private static void writeSetToGeneratorTagged(
    ASN1Generator asn1Gen,
    ASN1SetParser asn1SetParser,
    int           tagNo)
    throws IOException
{
    ASN1Set asn1Set = getASN1Set(asn1SetParser);

    if (asn1Set != null)
    {
        if (asn1SetParser instanceof BERSetParser)
        {
            asn1Gen.getRawOutputStream().write(new BERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
        else
        {
            asn1Gen.getRawOutputStream().write(new DERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
    }
}
项目:gwt-crypto    文件:ContentInfo.java   
/**
 * 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);
    }
}
项目:gwt-crypto    文件:CMSSignedDataParser.java   
private static void writeSetToGeneratorTagged(
    ASN1Generator asn1Gen,
    ASN1SetParser asn1SetParser,
    int           tagNo)
    throws IOException
{
    ASN1Set asn1Set = getASN1Set(asn1SetParser);

    if (asn1Set != null)
    {
        if (asn1SetParser instanceof BERSetParser)
        {
            asn1Gen.getRawOutputStream().write(new BERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
        else
        {
            asn1Gen.getRawOutputStream().write(new DERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
    }
}
项目:Aki-SSL    文件:ContentInfo.java   
/**
 * 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);
    }
}
项目:Aki-SSL    文件:CMSSignedDataParser.java   
private static void writeSetToGeneratorTagged(
    ASN1Generator asn1Gen,
    ASN1SetParser asn1SetParser,
    int           tagNo)
    throws IOException
{
    ASN1Set asn1Set = getASN1Set(asn1SetParser);

    if (asn1Set != null)
    {
        if (asn1SetParser instanceof BERSetParser)
        {
            asn1Gen.getRawOutputStream().write(new BERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
        else
        {
            asn1Gen.getRawOutputStream().write(new DERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
    }
}
项目:TinyTravelTracker    文件:ContentInfo.java   
/**
 * 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);
    }
}
项目:CryptMeme    文件:ContentInfo.java   
/**
 * 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);
    }
}
项目:irma_future_id    文件:CMSSignedDataParser.java   
private static void writeSetToGeneratorTagged(
    ASN1Generator asn1Gen,
    ASN1SetParser asn1SetParser,
    int           tagNo)
    throws IOException
{
    ASN1Set asn1Set = getASN1Set(asn1SetParser);

    if (asn1Set != null)
    {
        if (asn1SetParser instanceof BERSetParser)
        {
            asn1Gen.getRawOutputStream().write(new BERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
        else
        {
            asn1Gen.getRawOutputStream().write(new DERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
    }
}
项目:irma_future_id    文件:CMSSignedDataParser.java   
private static void writeSetToGeneratorTagged(
    ASN1Generator asn1Gen,
    ASN1SetParser asn1SetParser,
    int           tagNo)
    throws IOException
{
    ASN1Set asn1Set = getASN1Set(asn1SetParser);

    if (asn1Set != null)
    {
        if (asn1SetParser instanceof BERSetParser)
        {
            asn1Gen.getRawOutputStream().write(new BERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
        else
        {
            asn1Gen.getRawOutputStream().write(new DERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
    }
}
项目:irma_future_id    文件:CMSSignedDataParser.java   
private static void writeSetToGeneratorTagged(
    ASN1Generator asn1Gen,
    ASN1SetParser asn1SetParser,
    int           tagNo)
    throws IOException
{
    ASN1Set asn1Set = getASN1Set(asn1SetParser);

    if (asn1Set != null)
    {
        if (asn1SetParser instanceof BERSetParser)
        {
            asn1Gen.getRawOutputStream().write(new BERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
        else
        {
            asn1Gen.getRawOutputStream().write(new DERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
    }
}
项目:irma_future_id    文件:CMSSignedDataParser.java   
private static void writeSetToGeneratorTagged(
    ASN1Generator asn1Gen,
    ASN1SetParser asn1SetParser,
    int           tagNo)
    throws IOException
{
    ASN1Set asn1Set = getASN1Set(asn1SetParser);

    if (asn1Set != null)
    {
        if (asn1SetParser instanceof BERSetParser)
        {
            asn1Gen.getRawOutputStream().write(new BERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
        else
        {
            asn1Gen.getRawOutputStream().write(new DERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
    }
}
项目:irma_future_id    文件:ContentInfo.java   
/**
 * 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);
    }
}
项目:bc-java    文件:CMSSignedDataParser.java   
private static void writeSetToGeneratorTagged(
    ASN1Generator asn1Gen,
    ASN1SetParser asn1SetParser,
    int           tagNo)
    throws IOException
{
    ASN1Set asn1Set = getASN1Set(asn1SetParser);

    if (asn1Set != null)
    {
        if (asn1SetParser instanceof BERSetParser)
        {
            asn1Gen.getRawOutputStream().write(new BERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
        else
        {
            asn1Gen.getRawOutputStream().write(new DERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
    }
}
项目:bc-java    文件:CMSSignedDataParser.java   
private static void writeSetToGeneratorTagged(
    ASN1Generator asn1Gen,
    ASN1SetParser asn1SetParser,
    int           tagNo)
    throws IOException
{
    ASN1Set asn1Set = getASN1Set(asn1SetParser);

    if (asn1Set != null)
    {
        if (asn1SetParser instanceof BERSetParser)
        {
            asn1Gen.getRawOutputStream().write(new BERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
        else
        {
            asn1Gen.getRawOutputStream().write(new DERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
    }
}
项目:bc-java    文件:CMSSignedDataParser.java   
private static void writeSetToGeneratorTagged(
    ASN1Generator asn1Gen,
    ASN1SetParser asn1SetParser,
    int           tagNo)
    throws IOException
{
    ASN1Set asn1Set = getASN1Set(asn1SetParser);

    if (asn1Set != null)
    {
        if (asn1SetParser instanceof BERSetParser)
        {
            asn1Gen.getRawOutputStream().write(new BERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
        else
        {
            asn1Gen.getRawOutputStream().write(new DERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
    }
}
项目:bc-java    文件:CMSSignedDataParser.java   
private static void writeSetToGeneratorTagged(
    ASN1Generator asn1Gen,
    ASN1SetParser asn1SetParser,
    int           tagNo)
    throws IOException
{
    ASN1Set asn1Set = getASN1Set(asn1SetParser);

    if (asn1Set != null)
    {
        if (asn1SetParser instanceof BERSetParser)
        {
            asn1Gen.getRawOutputStream().write(new BERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
        else
        {
            asn1Gen.getRawOutputStream().write(new DERTaggedObject(false, tagNo, asn1Set).getEncoded());
        }
    }
}
项目:bc-java    文件:ContentInfo.java   
/**
 * 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);
    }
}
项目:keepass2android    文件:ContentInfo.java   
/**
 * 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);
}
项目:ipack    文件:EncryptedData.java   
public EncryptedData(
    ASN1ObjectIdentifier contentType,
    AlgorithmIdentifier     encryptionAlgorithm,
    ASN1Encodable content)
{
    ASN1EncodableVector v = new ASN1EncodableVector();

    v.add(contentType);
    v.add(encryptionAlgorithm.toASN1Primitive());
    v.add(new BERTaggedObject(false, 0, content));

    data = new BERSequence(v);
}
项目:ipack    文件:SignedData.java   
/**
 * Produce an object suitable for an ASN1OutputStream.
 * <pre>
 * SignedData ::= SEQUENCE {
 *     version CMSVersion,
 *     digestAlgorithms DigestAlgorithmIdentifiers,
 *     encapContentInfo EncapsulatedContentInfo,
 *     certificates [0] IMPLICIT CertificateSet OPTIONAL,
 *     crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
 *     signerInfos SignerInfos
 *   }
 * </pre>
 */
public ASN1Primitive toASN1Primitive()
{
    ASN1EncodableVector  v = new ASN1EncodableVector();

    v.add(version);
    v.add(digestAlgorithms);
    v.add(contentInfo);

    if (certificates != null)
    {
        if (certsBer)
        {
            v.add(new BERTaggedObject(false, 0, certificates));
        }
        else
        {
            v.add(new DERTaggedObject(false, 0, certificates));
        }
    }

    if (crls != null)
    {
        if (crlsBer)
        {
            v.add(new BERTaggedObject(false, 1, crls));
        }
        else
        {
            v.add(new DERTaggedObject(false, 1, crls));
        }
    }

    v.add(signerInfos);

    return new BERSequence(v);
}
项目:ipack    文件:EncryptedData.java   
/**
 * <pre>
 *       EncryptedData ::= SEQUENCE {
 *                     version CMSVersion,
 *                     encryptedContentInfo EncryptedContentInfo,
 *                     unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL }
 * </pre>
 * @return a basic ASN.1 object representation.
 */
public ASN1Primitive toASN1Primitive()
{
    ASN1EncodableVector v = new ASN1EncodableVector();

    v.add(version);
    v.add(encryptedContentInfo);
    if (unprotectedAttrs != null)
    {
        v.add(new BERTaggedObject(false, 1, unprotectedAttrs));
    }

    return new BERSequence(v);
}
项目:ipack    文件:EncryptedContentInfo.java   
/** 
 * Produce an object suitable for an ASN1OutputStream.
 * <pre>
 * EncryptedContentInfo ::= SEQUENCE {
 *     contentType ContentType,
 *     contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
 *     encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL 
 * }
 * </pre>
 */
public ASN1Primitive toASN1Primitive()
{
    ASN1EncodableVector  v = new ASN1EncodableVector();

    v.add(contentType);
    v.add(contentEncryptionAlgorithm);

    if (encryptedContent != null)
    {
        v.add(new BERTaggedObject(false, 0, encryptedContent));
    }

    return new BERSequence(v);
}
项目:ipack    文件:ContentInfo.java   
/**
 * 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(0, content));
    }

    return new BERSequence(v);
}
项目:KeePass2Android    文件:ContentInfo.java   
/**
 * 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);
}
项目:gwt-crypto    文件:EncryptedData.java   
public EncryptedData(
    ASN1ObjectIdentifier contentType,
    AlgorithmIdentifier     encryptionAlgorithm,
    ASN1Encodable content)
{
    ASN1EncodableVector v = new ASN1EncodableVector();

    v.add(contentType);
    v.add(encryptionAlgorithm.toASN1Primitive());
    v.add(new BERTaggedObject(false, 0, content));

    data = new BERSequence(v);
}
项目:gwt-crypto    文件:SignedData.java   
/**
 * Produce an object suitable for an ASN1OutputStream.
 */
public ASN1Primitive toASN1Primitive()
{
    ASN1EncodableVector  v = new ASN1EncodableVector();

    v.add(version);
    v.add(digestAlgorithms);
    v.add(contentInfo);

    if (certificates != null)
    {
        if (certsBer)
        {
            v.add(new BERTaggedObject(false, 0, certificates));
        }
        else
        {
            v.add(new DERTaggedObject(false, 0, certificates));
        }
    }

    if (crls != null)
    {
        if (crlsBer)
        {
            v.add(new BERTaggedObject(false, 1, crls));
        }
        else
        {
            v.add(new DERTaggedObject(false, 1, crls));
        }
    }

    v.add(signerInfos);

    return new BERSequence(v);
}
项目:gwt-crypto    文件:EncryptedData.java   
/**
 * @return a basic ASN.1 object representation.
 */
public ASN1Primitive toASN1Primitive()
{
    ASN1EncodableVector v = new ASN1EncodableVector();

    v.add(version);
    v.add(encryptedContentInfo);
    if (unprotectedAttrs != null)
    {
        v.add(new BERTaggedObject(false, 1, unprotectedAttrs));
    }

    return new BERSequence(v);
}
项目:gwt-crypto    文件:EncryptedContentInfo.java   
/** 
 * Produce an object suitable for an ASN1OutputStream.
 */
public ASN1Primitive toASN1Primitive()
{
    ASN1EncodableVector  v = new ASN1EncodableVector();

    v.add(contentType);
    v.add(contentEncryptionAlgorithm);

    if (encryptedContent != null)
    {
        v.add(new BERTaggedObject(false, 0, encryptedContent));
    }

    return new BERSequence(v);
}
项目:gwt-crypto    文件:ContentInfo.java   
/**
 * Produce an object suitable for an ASN1OutputStream.
 */
public ASN1Primitive toASN1Primitive()
{
    ASN1EncodableVector  v = new ASN1EncodableVector();

    v.add(contentType);

    if (content != null)
    {
        v.add(new BERTaggedObject(0, content));
    }

    return new BERSequence(v);
}
项目:Aki-SSL    文件:EncryptedData.java   
public EncryptedData(
    ASN1ObjectIdentifier contentType,
    AlgorithmIdentifier     encryptionAlgorithm,
    ASN1Encodable content)
{
    ASN1EncodableVector v = new ASN1EncodableVector();

    v.add(contentType);
    v.add(encryptionAlgorithm.toASN1Primitive());
    v.add(new BERTaggedObject(false, 0, content));

    data = new BERSequence(v);
}
项目:Aki-SSL    文件:SignedData.java   
/**
 * Produce an object suitable for an ASN1OutputStream.
 */
public ASN1Primitive toASN1Primitive()
{
    ASN1EncodableVector  v = new ASN1EncodableVector();

    v.add(version);
    v.add(digestAlgorithms);
    v.add(contentInfo);

    if (certificates != null)
    {
        if (certsBer)
        {
            v.add(new BERTaggedObject(false, 0, certificates));
        }
        else
        {
            v.add(new DERTaggedObject(false, 0, certificates));
        }
    }

    if (crls != null)
    {
        if (crlsBer)
        {
            v.add(new BERTaggedObject(false, 1, crls));
        }
        else
        {
            v.add(new DERTaggedObject(false, 1, crls));
        }
    }

    v.add(signerInfos);

    return new BERSequence(v);
}
项目:Aki-SSL    文件:EncryptedData.java   
/**
 * @return a basic ASN.1 object representation.
 */
public ASN1Primitive toASN1Primitive()
{
    ASN1EncodableVector v = new ASN1EncodableVector();

    v.add(version);
    v.add(encryptedContentInfo);
    if (unprotectedAttrs != null)
    {
        v.add(new BERTaggedObject(false, 1, unprotectedAttrs));
    }

    return new BERSequence(v);
}
项目:Aki-SSL    文件:EncryptedContentInfo.java   
/** 
 * Produce an object suitable for an ASN1OutputStream.
 */
public ASN1Primitive toASN1Primitive()
{
    ASN1EncodableVector  v = new ASN1EncodableVector();

    v.add(contentType);
    v.add(contentEncryptionAlgorithm);

    if (encryptedContent != null)
    {
        v.add(new BERTaggedObject(false, 0, encryptedContent));
    }

    return new BERSequence(v);
}
项目:Aki-SSL    文件:ContentInfo.java   
/**
 * Produce an object suitable for an ASN1OutputStream.
 */
public ASN1Primitive toASN1Primitive()
{
    ASN1EncodableVector  v = new ASN1EncodableVector();

    v.add(contentType);

    if (content != null)
    {
        v.add(new BERTaggedObject(0, content));
    }

    return new BERSequence(v);
}
项目:keystore-explorer    文件:Asn1Dump.java   
private String dumpTaggedObject(ASN1TaggedObject o) throws Asn1Exception, IOException {

        StringBuilder sb = new StringBuilder();

        sb.append(indentSequence.toString(indentLevel));
        if (o instanceof BERTaggedObject) {
            sb.append("BER TAGGED [");
        } else {
            sb.append("TAGGED [");
        }
        sb.append(Integer.toString(o.getTagNo()));
        sb.append(']');

        if (!o.isExplicit()) {
            sb.append(" IMPLICIT ");
        }
        sb.append(":");
        sb.append(NEWLINE);

        if (o.isEmpty()) {
            sb.append("EMPTY");
        } else {
            sb.append(dump(o.getObject()));
        }

        return sb.toString();
    }
项目:TinyTravelTracker    文件:EncryptedData.java   
public EncryptedData(
    ASN1ObjectIdentifier contentType,
    AlgorithmIdentifier     encryptionAlgorithm,
    ASN1Encodable content)
{
    ASN1EncodableVector v = new ASN1EncodableVector();

    v.add(contentType);
    v.add(encryptionAlgorithm.toASN1Primitive());
    v.add(new BERTaggedObject(false, 0, content));

    data = new BERSequence(v);
}
项目:TinyTravelTracker    文件:SignedData.java   
/**
 * Produce an object suitable for an ASN1OutputStream.
 */
public ASN1Primitive toASN1Primitive()
{
    ASN1EncodableVector  v = new ASN1EncodableVector();

    v.add(version);
    v.add(digestAlgorithms);
    v.add(contentInfo);

    if (certificates != null)
    {
        if (certsBer)
        {
            v.add(new BERTaggedObject(false, 0, certificates));
        }
        else
        {
            v.add(new DERTaggedObject(false, 0, certificates));
        }
    }

    if (crls != null)
    {
        if (crlsBer)
        {
            v.add(new BERTaggedObject(false, 1, crls));
        }
        else
        {
            v.add(new DERTaggedObject(false, 1, crls));
        }
    }

    v.add(signerInfos);

    return new BERSequence(v);
}
项目:TinyTravelTracker    文件:EncryptedData.java   
/**
 * @return a basic ASN.1 object representation.
 */
public ASN1Primitive toASN1Primitive()
{
    ASN1EncodableVector v = new ASN1EncodableVector();

    v.add(version);
    v.add(encryptedContentInfo);
    if (unprotectedAttrs != null)
    {
        v.add(new BERTaggedObject(false, 1, unprotectedAttrs));
    }

    return new BERSequence(v);
}
项目:TinyTravelTracker    文件:EncryptedContentInfo.java   
/** 
 * Produce an object suitable for an ASN1OutputStream.
 */
public ASN1Primitive toASN1Primitive()
{
    ASN1EncodableVector  v = new ASN1EncodableVector();

    v.add(contentType);
    v.add(contentEncryptionAlgorithm);

    if (encryptedContent != null)
    {
        v.add(new BERTaggedObject(false, 0, encryptedContent));
    }

    return new BERSequence(v);
}