本文整理汇总了Java中org.bouncycastle.asn1.ASN1ApplicationSpecific.getInstance方法的典型用法代码示例。如果您正苦于以下问题:Java ASN1ApplicationSpecific.getInstance方法的具体用法?Java ASN1ApplicationSpecific.getInstance怎么用?Java ASN1ApplicationSpecific.getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bouncycastle.asn1.ASN1ApplicationSpecific
的用法示例。
在下文中一共展示了ASN1ApplicationSpecific.getInstance方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: 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());
}
}
示例3: 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;
}
示例4: 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;
}
示例5: 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;
}
示例6: 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;
}