本文整理汇总了Java中org.bouncycastle.asn1.ASN1TaggedObject.isExplicit方法的典型用法代码示例。如果您正苦于以下问题:Java ASN1TaggedObject.isExplicit方法的具体用法?Java ASN1TaggedObject.isExplicit怎么用?Java ASN1TaggedObject.isExplicit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bouncycastle.asn1.ASN1TaggedObject
的用法示例。
在下文中一共展示了ASN1TaggedObject.isExplicit方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ContentInfo
import org.bouncycastle.asn1.ASN1TaggedObject; //导入方法依赖的package包/类
/**
* @deprecated use getInstance()
*/
public ContentInfo(
ASN1Sequence seq)
{
if (seq.size() < 1 || seq.size() > 2)
{
throw new IllegalArgumentException("Bad sequence size: " + seq.size());
}
contentType = (ASN1ObjectIdentifier)seq.getObjectAt(0);
if (seq.size() > 1)
{
ASN1TaggedObject tagged = (ASN1TaggedObject)seq.getObjectAt(1);
if (!tagged.isExplicit() || tagged.getTagNo() != 0)
{
throw new IllegalArgumentException("Bad tag for 'content'");
}
content = tagged.getObject();
}
}
示例2: getKEKInfo
import org.bouncycastle.asn1.ASN1TaggedObject; //导入方法依赖的package包/类
private KEKRecipientInfo getKEKInfo(ASN1TaggedObject o)
{
if (o.isExplicit())
{ // compatibilty with erroneous version
return KEKRecipientInfo.getInstance(o, true);
}
else
{
return KEKRecipientInfo.getInstance(o, false);
}
}
示例3: DSTU4145ECBinary
import org.bouncycastle.asn1.ASN1TaggedObject; //导入方法依赖的package包/类
private DSTU4145ECBinary(ASN1Sequence seq)
{
int index = 0;
if (seq.getObjectAt(index) instanceof ASN1TaggedObject)
{
ASN1TaggedObject taggedVersion = (ASN1TaggedObject)seq.getObjectAt(index);
if (taggedVersion.isExplicit() && 0 == taggedVersion.getTagNo())
{
version = ASN1Integer.getInstance(taggedVersion.getLoadedObject()).getValue();
index++;
}
else
{
throw new IllegalArgumentException("object parse error");
}
}
f = DSTU4145BinaryField.getInstance(seq.getObjectAt(index));
index++;
a = ASN1Integer.getInstance(seq.getObjectAt(index));
index++;
b = ASN1OctetString.getInstance(seq.getObjectAt(index));
index++;
n = ASN1Integer.getInstance(seq.getObjectAt(index));
index++;
bp = ASN1OctetString.getInstance(seq.getObjectAt(index));
}