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


Java AttributeCertificate.getInstance方法代码示例

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


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

示例1: getInstance

import org.bouncycastle.asn1.x509.AttributeCertificate; //导入方法依赖的package包/类
public static CMPCertificate getInstance(Object o)
{
    if (o == null || o instanceof CMPCertificate)
    {
        return (CMPCertificate)o;
    }

    if (o instanceof ASN1Sequence || o instanceof byte[])
    {
        return new CMPCertificate(Certificate.getInstance(o));
    }

    if (o instanceof ASN1TaggedObject)
    {
        return new CMPCertificate(AttributeCertificate.getInstance(((ASN1TaggedObject)o).getObject()));
    }

    throw new IllegalArgumentException("Invalid object: " + o.getClass().getName());
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:20,代码来源:CMPCertificate.java

示例2: generateAttrStructure

import org.bouncycastle.asn1.x509.AttributeCertificate; //导入方法依赖的package包/类
private static AttributeCertificate generateAttrStructure(AttributeCertificateInfo attrInfo, AlgorithmIdentifier sigAlgId, byte[] signature)
{
    ASN1EncodableVector v = new ASN1EncodableVector();

    v.add(attrInfo);
    v.add(sigAlgId);
    v.add(new DERBitString(signature));

    return AttributeCertificate.getInstance(new DERSequence(v));
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:11,代码来源:CertUtils.java

示例3: SignerAttribute

import org.bouncycastle.asn1.x509.AttributeCertificate; //导入方法依赖的package包/类
private SignerAttribute(
    ASN1Sequence seq)
{
    int index = 0;
    values = new Object[seq.size()];

    for (Enumeration e = seq.getObjects(); e.hasMoreElements();)
    {
        ASN1TaggedObject taggedObject = ASN1TaggedObject.getInstance(e.nextElement());

        if (taggedObject.getTagNo() == 0)
        {
            ASN1Sequence attrs = ASN1Sequence.getInstance(taggedObject, true);
            Attribute[]  attributes = new Attribute[attrs.size()];

            for (int i = 0; i != attributes.length; i++)
            {
                attributes[i] = Attribute.getInstance(attrs.getObjectAt(i));
            }
            values[index] = attributes;
        }
        else if (taggedObject.getTagNo() == 1)
        {
            values[index] = AttributeCertificate.getInstance(ASN1Sequence.getInstance(taggedObject, true));
        }
        else
        {
            throw new IllegalArgumentException("illegal tag: " + taggedObject.getTagNo());
        }
        index++;
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:33,代码来源:SignerAttribute.java

示例4: X509V2AttributeCertificate

import org.bouncycastle.asn1.x509.AttributeCertificate; //导入方法依赖的package包/类
public X509V2AttributeCertificate(
    InputStream encIn)
    throws IOException
{
    this(AttributeCertificate.getInstance(new ASN1InputStream(encIn).readObject()));
}
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:7,代码来源:X509V2AttributeCertificate.java

示例5: JcaX509AttributeCertificateHolder

import org.bouncycastle.asn1.x509.AttributeCertificate; //导入方法依赖的package包/类
/**
 * Base constructor.
 *
 * @param cert AttributeCertificate to be used a the source for the holder creation.
 * @throws IOException if there is a problem extracting the attribute certificate information.
 */
public JcaX509AttributeCertificateHolder(X509AttributeCertificate cert)
    throws IOException
{
    super(AttributeCertificate.getInstance(cert.getEncoded()));
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:12,代码来源:JcaX509AttributeCertificateHolder.java

示例6: getX509v2AttrCert

import org.bouncycastle.asn1.x509.AttributeCertificate; //导入方法依赖的package包/类
/**
 * Return an AttributeCertificate interpretation of otherCert.
 * @deprecated use getOtherCert and getOtherTag to make sure message is really what it should be.
 *
 * @return  an AttributeCertificate
 */
public AttributeCertificate getX509v2AttrCert()
{
    return AttributeCertificate.getInstance(otherCert);
}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:11,代码来源:CMPCertificate.java


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