当前位置: 首页>>代码示例>>Java>>正文


Java BERTaggedObject类代码示例

本文整理汇总了Java中org.bouncycastle.asn1.BERTaggedObject的典型用法代码示例。如果您正苦于以下问题:Java BERTaggedObject类的具体用法?Java BERTaggedObject怎么用?Java BERTaggedObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BERTaggedObject类属于org.bouncycastle.asn1包,在下文中一共展示了BERTaggedObject类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: toASN1Primitive

import org.bouncycastle.asn1.BERTaggedObject; //导入依赖的package包/类
/**
 * 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);
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:30,代码来源:ContentInfo.java

示例2: writeSetToGeneratorTagged

import org.bouncycastle.asn1.BERTaggedObject; //导入依赖的package包/类
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());
        }
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:21,代码来源:CMSSignedDataParser.java

示例3: toASN1Object

import org.bouncycastle.asn1.BERTaggedObject; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:PhilippC,项目名称:keepass2android,代码行数:23,代码来源:ContentInfo.java

示例4: EncryptedData

import org.bouncycastle.asn1.BERTaggedObject; //导入依赖的package包/类
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);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:14,代码来源:EncryptedData.java

示例5: toASN1Primitive

import org.bouncycastle.asn1.BERTaggedObject; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:50,代码来源:SignedData.java

示例6: toASN1Primitive

import org.bouncycastle.asn1.BERTaggedObject; //导入依赖的package包/类
/**
 * <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);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:23,代码来源:EncryptedData.java

示例7: toASN1Primitive

import org.bouncycastle.asn1.BERTaggedObject; //导入依赖的package包/类
/** 
 * 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);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:25,代码来源:EncryptedContentInfo.java

示例8: toASN1Primitive

import org.bouncycastle.asn1.BERTaggedObject; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:23,代码来源:ContentInfo.java

示例9: toASN1Primitive

import org.bouncycastle.asn1.BERTaggedObject; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:40,代码来源:SignedData.java

示例10: toASN1Primitive

import org.bouncycastle.asn1.BERTaggedObject; //导入依赖的package包/类
/**
 * @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);
}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:17,代码来源:EncryptedData.java

示例11: toASN1Primitive

import org.bouncycastle.asn1.BERTaggedObject; //导入依赖的package包/类
/** 
 * 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);
}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:18,代码来源:EncryptedContentInfo.java

示例12: toASN1Primitive

import org.bouncycastle.asn1.BERTaggedObject; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:17,代码来源:ContentInfo.java

示例13: dumpTaggedObject

import org.bouncycastle.asn1.BERTaggedObject; //导入依赖的package包/类
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();
	}
 
开发者ID:kaikramer,项目名称:keystore-explorer,代码行数:28,代码来源:Asn1Dump.java


注:本文中的org.bouncycastle.asn1.BERTaggedObject类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。