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


Java ASN1ApplicationSpecific类代码示例

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


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

示例1: CVCertificateRequest

import org.bouncycastle.asn1.ASN1ApplicationSpecific; //导入依赖的package包/类
private CVCertificateRequest(ASN1ApplicationSpecific request)
    throws IOException
{
    if (request.getApplicationTag() == EACTags.AUTHENTIFICATION_DATA)
    {
        ASN1Sequence seq = ASN1Sequence.getInstance(request.getObject(BERTags.SEQUENCE));

        initCertBody(ASN1ApplicationSpecific.getInstance(seq.getObjectAt(0)));

        outerSignature = ASN1ApplicationSpecific.getInstance(seq.getObjectAt(seq.size() - 1)).getContents();
    }
    else
    {
        initCertBody(request);
    }
}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:17,代码来源:CVCertificateRequest.java

示例2: getInstance

import org.bouncycastle.asn1.ASN1ApplicationSpecific; //导入依赖的package包/类
public static CVCertificateRequest getInstance(Object obj)
{
    if (obj instanceof CVCertificateRequest)
    {
        return (CVCertificateRequest)obj;
    }
    else if (obj != null)
    {
        try
        {
            return new CVCertificateRequest(ASN1ApplicationSpecific.getInstance(obj));
        }
        catch (IOException e)
        {
            throw new ASN1ParsingException("unable to parse data: " + e.getMessage(), e);
        }
    }

    return null;
}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:21,代码来源:CVCertificateRequest.java

示例3: encodeTag

import org.bouncycastle.asn1.ASN1ApplicationSpecific; //导入依赖的package包/类
public static int encodeTag(ASN1ApplicationSpecific spec)
{
    int retValue = BERTags.APPLICATION;
    boolean constructed = spec.isConstructed();
    if (constructed)
    {
        retValue |= BERTags.CONSTRUCTED;
    }

    int tag = spec.getApplicationTag();

    if (tag > 31)
    {
        retValue |= 0x1F;
        retValue <<= 8;

        int currentByte = tag & 0x7F;
        retValue |= currentByte;
        tag >>= 7;

        while (tag > 0)
        {
            retValue |= 0x80;
            retValue <<= 8;

            currentByte = tag & 0x7F;
            tag >>= 7;
        }
    }
    else
    {
        retValue |= tag;
    }

    return retValue;
}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:37,代码来源:EACTags.java

示例4: initCertBody

import org.bouncycastle.asn1.ASN1ApplicationSpecific; //导入依赖的package包/类
private void initCertBody(ASN1ApplicationSpecific request)
    throws IOException
{
    if (request.getApplicationTag() == EACTags.CARDHOLDER_CERTIFICATE)
    {
        ASN1Sequence seq = ASN1Sequence.getInstance(request.getObject(BERTags.SEQUENCE));
        for (Enumeration en = seq.getObjects(); en.hasMoreElements();)
        {
            ASN1ApplicationSpecific obj = ASN1ApplicationSpecific.getInstance(en.nextElement());
            switch (obj.getApplicationTag())
            {
            case EACTags.CERTIFICATE_CONTENT_TEMPLATE:
                certificateBody = CertificateBody.getInstance(obj);
                valid |= bodyValid;
                break;
            case EACTags.STATIC_INTERNAL_AUTHENTIFICATION_ONE_STEP:
                innerSignature = obj.getContents();
                valid |= signValid;
                break;
            default:
                throw new IOException("Invalid tag, not an CV Certificate Request element:" + obj.getApplicationTag());
            }
        }
    }
    else
    {
        throw new IOException("not a CARDHOLDER_CERTIFICATE in request:" + request.getApplicationTag());
    }
}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:30,代码来源:CVCertificateRequest.java

示例5: getInstance

import org.bouncycastle.asn1.ASN1ApplicationSpecific; //导入依赖的package包/类
/**
 * Gives an instance of Iso7816CertificateBody taken from Object obj
 *
 * @param obj is the Object to extract the certificate body from.
 * @return the Iso7816CertificateBody taken from Object obj.
 * @throws IOException if object is not valid.
 */
public static CertificateBody getInstance(Object obj)
    throws IOException
{
    if (obj instanceof CertificateBody)
    {
        return (CertificateBody)obj;
    }
    else if (obj != null)
    {
        return new CertificateBody(ASN1ApplicationSpecific.getInstance(obj));
    }

    return null;
}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:22,代码来源:CertificateBody.java

示例6: encodeTag

import org.bouncycastle.asn1.ASN1ApplicationSpecific; //导入依赖的package包/类
public static int encodeTag(ASN1ApplicationSpecific appSpe)
 {
 	int retValue = BERTags.APPLICATION;
 	boolean constructed = appSpe.isConstructed();
 	if (constructed)
 		retValue |= BERTags.CONSTRUCTED;
 	
 	int tag = appSpe.getApplicationTag();
 	
 	if (tag > 31)
 	{
 		retValue |= 0x1F;
retValue <<= 8;

int currentByte = tag & 0x7F;
 		retValue |= currentByte;
 		tag >>= 7;
 		
 		while (tag > 0)
 		{
 			retValue |= 0x80;
 			retValue <<= 8;
 			
 			currentByte = tag & 0x7F;
 			tag >>= 7;
 		}
 	}
 	else
 		retValue |= tag;
 		
 	return retValue;
 }
 
开发者ID:tsenger,项目名称:animamea,代码行数:33,代码来源:EACTags.java

示例7: getInstance

import org.bouncycastle.asn1.ASN1ApplicationSpecific; //导入依赖的package包/类
public static DiscretionaryDataTemplate getInstance(Object obj) throws IOException {
	if (obj instanceof DiscretionaryDataTemplate) {
		return (DiscretionaryDataTemplate) obj;
	} else if (obj != null) {
		return new DiscretionaryDataTemplate(ASN1ApplicationSpecific.getInstance(obj));
	}

	return null;
}
 
开发者ID:tsenger,项目名称:animamea,代码行数:10,代码来源:DiscretionaryDataTemplate.java

示例8: getInstance

import org.bouncycastle.asn1.ASN1ApplicationSpecific; //导入依赖的package包/类
public static CVExtensions getInstance(Object appSpe)
    throws IOException
{
    if (appSpe instanceof CVExtensions)
    {
        return (CVExtensions)appSpe;
    }
    else if (appSpe != null)
    {
        return new CVExtensions(ASN1ApplicationSpecific.getInstance(appSpe));
    }

    return null;
}
 
开发者ID:tsenger,项目名称:animamea,代码行数:15,代码来源:CVExtensions.java

示例9: DiscretionaryDataTemplate

import org.bouncycastle.asn1.ASN1ApplicationSpecific; //导入依赖的package包/类
private DiscretionaryDataTemplate(ASN1ApplicationSpecific appSpe) throws IOException {
	setDiscretionaryData(appSpe);
}
 
开发者ID:tsenger,项目名称:animamea,代码行数:4,代码来源:DiscretionaryDataTemplate.java

示例10: CVExtensions

import org.bouncycastle.asn1.ASN1ApplicationSpecific; //导入依赖的package包/类
private CVExtensions(ASN1ApplicationSpecific appSpe)
    throws IOException
{
    setCertificateExtensions(appSpe);
}
 
开发者ID:tsenger,项目名称:animamea,代码行数:6,代码来源:CVExtensions.java

示例11: getInstance

import org.bouncycastle.asn1.ASN1ApplicationSpecific; //导入依赖的package包/类
public static AmECPublicKey getInstance(byte[] bytes) throws IOException {
	ASN1ApplicationSpecific seq = ASN1ApplicationSpecific.getInstance(bytes);
	AmECPublicKey ecPubKey = new AmECPublicKey(ASN1Sequence.getInstance(seq.getObject(16)));
	return ecPubKey;
}
 
开发者ID:tsenger,项目名称:animamea,代码行数:6,代码来源:AmECPublicKey.java

示例12: CVCertificate

import org.bouncycastle.asn1.ASN1ApplicationSpecific; //导入依赖的package包/类
/**
 * Create an iso7816Certificate structure from a DERApplicationSpecific.
 *
 * @param appSpe the DERApplicationSpecific object.
 * @return the Iso7816CertificateStructure represented by the DERApplicationSpecific object.
 * @throws IOException if there is a problem parsing the data.
 */
private CVCertificate(ASN1ApplicationSpecific appSpe)
    throws IOException
{
    setPrivateData(appSpe);
}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:13,代码来源:CVCertificate.java

示例13: CertificateBody

import org.bouncycastle.asn1.ASN1ApplicationSpecific; //导入依赖的package包/类
/**
 * builds an Iso7816CertificateBody with an ASN1InputStream.
 *
 * @param obj DERApplicationSpecific containing the whole body.
 * @throws IOException if the body is not valid.
 */
private CertificateBody(ASN1ApplicationSpecific obj)
    throws IOException
{
    setIso7816CertificateBody(obj);
}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:12,代码来源:CertificateBody.java


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