本文整理匯總了Java中org.bouncycastle.asn1.ASN1Sequence.getObjectAt方法的典型用法代碼示例。如果您正苦於以下問題:Java ASN1Sequence.getObjectAt方法的具體用法?Java ASN1Sequence.getObjectAt怎麽用?Java ASN1Sequence.getObjectAt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.bouncycastle.asn1.ASN1Sequence
的用法示例。
在下文中一共展示了ASN1Sequence.getObjectAt方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: NameOrPseudonym
import org.bouncycastle.asn1.ASN1Sequence; //導入方法依賴的package包/類
/**
* Constructor from ASN1Sequence.
* <p/>
* The sequence is of type NameOrPseudonym:
* <p/>
* <pre>
* NameOrPseudonym ::= CHOICE {
* surAndGivenName SEQUENCE {
* surName DirectoryString,
* givenName SEQUENCE OF DirectoryString
* },
* pseudonym DirectoryString
* }
* </pre>
*
* @param seq The ASN.1 sequence.
*/
private NameOrPseudonym(ASN1Sequence seq)
{
if (seq.size() != 2)
{
throw new IllegalArgumentException("Bad sequence size: "
+ seq.size());
}
if (!(seq.getObjectAt(0) instanceof ASN1String))
{
throw new IllegalArgumentException("Bad object encountered: "
+ seq.getObjectAt(0).getClass());
}
surname = DirectoryString.getInstance(seq.getObjectAt(0));
givenName = ASN1Sequence.getInstance(seq.getObjectAt(1));
}
示例2: POPOSigningKey
import org.bouncycastle.asn1.ASN1Sequence; //導入方法依賴的package包/類
private POPOSigningKey(ASN1Sequence seq)
{
int index = 0;
if (seq.getObjectAt(index) instanceof ASN1TaggedObject)
{
ASN1TaggedObject tagObj
= (ASN1TaggedObject)seq.getObjectAt(index++);
if (tagObj.getTagNo() != 0)
{
throw new IllegalArgumentException(
"Unknown POPOSigningKeyInput tag: " + tagObj.getTagNo());
}
poposkInput = POPOSigningKeyInput.getInstance(tagObj.getObject());
}
algorithmIdentifier = AlgorithmIdentifier.getInstance(seq.getObjectAt(index++));
signature = DERBitString.getInstance(seq.getObjectAt(index));
}
示例3: EncryptedContentInfo
import org.bouncycastle.asn1.ASN1Sequence; //導入方法依賴的package包/類
private EncryptedContentInfo(
ASN1Sequence seq)
{
if (seq.size() < 2)
{
throw new IllegalArgumentException("Truncated Sequence Found");
}
contentType = (ASN1ObjectIdentifier)seq.getObjectAt(0);
contentEncryptionAlgorithm = AlgorithmIdentifier.getInstance(
seq.getObjectAt(1));
if (seq.size() > 2)
{
encryptedContent = ASN1OctetString.getInstance(
(ASN1TaggedObject)seq.getObjectAt(2), false);
}
}
示例4: EnvelopedData
import org.bouncycastle.asn1.ASN1Sequence; //導入方法依賴的package包/類
/**
* @deprecated use getInstance()
*/
public EnvelopedData(
ASN1Sequence seq)
{
int index = 0;
version = (ASN1Integer)seq.getObjectAt(index++);
Object tmp = seq.getObjectAt(index++);
if (tmp instanceof ASN1TaggedObject)
{
originatorInfo = OriginatorInfo.getInstance((ASN1TaggedObject)tmp, false);
tmp = seq.getObjectAt(index++);
}
recipientInfos = ASN1Set.getInstance(tmp);
encryptedContentInfo = EncryptedContentInfo.getInstance(seq.getObjectAt(index++));
if(seq.size() > index)
{
unprotectedAttrs = ASN1Set.getInstance((ASN1TaggedObject)seq.getObjectAt(index), false);
}
}
示例5: CertResponse
import org.bouncycastle.asn1.ASN1Sequence; //導入方法依賴的package包/類
private CertResponse(ASN1Sequence seq)
{
certReqId = ASN1Integer.getInstance(seq.getObjectAt(0));
status = PKIStatusInfo.getInstance(seq.getObjectAt(1));
if (seq.size() >= 3)
{
if (seq.size() == 3)
{
ASN1Encodable o = seq.getObjectAt(2);
if (o instanceof ASN1OctetString)
{
rspInfo = ASN1OctetString.getInstance(o);
}
else
{
certifiedKeyPair = CertifiedKeyPair.getInstance(o);
}
}
else
{
certifiedKeyPair = CertifiedKeyPair.getInstance(seq.getObjectAt(2));
rspInfo = ASN1OctetString.getInstance(seq.getObjectAt(3));
}
}
}
示例6: McElieceCCA2PrivateKey
import org.bouncycastle.asn1.ASN1Sequence; //導入方法依賴的package包/類
private McElieceCCA2PrivateKey(ASN1Sequence seq)
{
oid = ((ASN1ObjectIdentifier)seq.getObjectAt(0));
BigInteger bigN = ((ASN1Integer)seq.getObjectAt(1)).getValue();
n = bigN.intValue();
BigInteger bigK = ((ASN1Integer)seq.getObjectAt(2)).getValue();
k = bigK.intValue();
encField = ((ASN1OctetString)seq.getObjectAt(3)).getOctets();
encGp = ((ASN1OctetString)seq.getObjectAt(4)).getOctets();
encP = ((ASN1OctetString)seq.getObjectAt(5)).getOctets();
encH = ((ASN1OctetString)seq.getObjectAt(6)).getOctets();
ASN1Sequence asnQInv = (ASN1Sequence)seq.getObjectAt(7);
encqInv = new byte[asnQInv.size()][];
for (int i = 0; i < asnQInv.size(); i++)
{
encqInv[i] = ((ASN1OctetString)asnQInv.getObjectAt(i)).getOctets();
}
}
示例7: OtherRevVals
import org.bouncycastle.asn1.ASN1Sequence; //導入方法依賴的package包/類
private OtherRevVals(ASN1Sequence seq)
{
if (seq.size() != 2)
{
throw new IllegalArgumentException("Bad sequence size: "
+ seq.size());
}
this.otherRevValType = (ASN1ObjectIdentifier)seq.getObjectAt(0);
try
{
this.otherRevVals = ASN1Primitive.fromByteArray(seq.getObjectAt(1)
.toASN1Primitive().getEncoded(ASN1Encoding.DER));
}
catch (IOException e)
{
throw new IllegalStateException();
}
}
示例8: TimeStampedData
import org.bouncycastle.asn1.ASN1Sequence; //導入方法依賴的package包/類
private TimeStampedData(ASN1Sequence seq)
{
this.version = ASN1Integer.getInstance(seq.getObjectAt(0));
int index = 1;
if (seq.getObjectAt(index) instanceof DERIA5String)
{
this.dataUri = DERIA5String.getInstance(seq.getObjectAt(index++));
}
if (seq.getObjectAt(index) instanceof MetaData || seq.getObjectAt(index) instanceof ASN1Sequence)
{
this.metaData = MetaData.getInstance(seq.getObjectAt(index++));
}
if (seq.getObjectAt(index) instanceof ASN1OctetString)
{
this.content = ASN1OctetString.getInstance(seq.getObjectAt(index++));
}
this.temporalEvidence = Evidence.getInstance(seq.getObjectAt(index));
}
示例9: GOST3410PublicKeyAlgParameters
import org.bouncycastle.asn1.ASN1Sequence; //導入方法依賴的package包/類
public GOST3410PublicKeyAlgParameters(
ASN1Sequence seq)
{
this.publicKeyParamSet = (ASN1ObjectIdentifier)seq.getObjectAt(0);
this.digestParamSet = (ASN1ObjectIdentifier)seq.getObjectAt(1);
if (seq.size() > 2)
{
this.encryptionParamSet = (ASN1ObjectIdentifier)seq.getObjectAt(2);
}
}
示例10: OtherRecipientInfo
import org.bouncycastle.asn1.ASN1Sequence; //導入方法依賴的package包/類
/**
* @deprecated use getInstance().
* @param seq
*/
public OtherRecipientInfo(
ASN1Sequence seq)
{
oriType = ASN1ObjectIdentifier.getInstance(seq.getObjectAt(0));
oriValue = seq.getObjectAt(1);
}
示例11: getAttributes
import org.bouncycastle.asn1.ASN1Sequence; //導入方法依賴的package包/類
public X509Attribute[] getAttributes()
{
ASN1Sequence seq = cert.getAcinfo().getAttributes();
X509Attribute[] attrs = new X509Attribute[seq.size()];
for (int i = 0; i != seq.size(); i++)
{
attrs[i] = new X509Attribute((ASN1Encodable)seq.getObjectAt(i));
}
return attrs;
}
示例12: CompressedData
import org.bouncycastle.asn1.ASN1Sequence; //導入方法依賴的package包/類
private CompressedData(
ASN1Sequence seq)
{
this.version = (ASN1Integer)seq.getObjectAt(0);
this.compressionAlgorithm = AlgorithmIdentifier.getInstance(seq.getObjectAt(1));
this.encapContentInfo = ContentInfo.getInstance(seq.getObjectAt(2));
}
示例13: SCVPReqRes
import org.bouncycastle.asn1.ASN1Sequence; //導入方法依賴的package包/類
private SCVPReqRes(
ASN1Sequence seq)
{
if (seq.getObjectAt(0) instanceof ASN1TaggedObject)
{
this.request = ContentInfo.getInstance(ASN1TaggedObject.getInstance(seq.getObjectAt(0)), true);
this.response = ContentInfo.getInstance(seq.getObjectAt(1));
}
else
{
this.request = null;
this.response = ContentInfo.getInstance(seq.getObjectAt(0));
}
}
示例14: PolicyQualifierInfo
import org.bouncycastle.asn1.ASN1Sequence; //導入方法依賴的package包/類
/**
* Creates a new <code>PolicyQualifierInfo</code> instance.
*
* @param as <code>PolicyQualifierInfo</code> X509 structure
* encoded as an ASN1Sequence.
*/
public PolicyQualifierInfo(
ASN1Sequence as)
{
if (as.size() != 2)
{
throw new IllegalArgumentException("Bad sequence size: "
+ as.size());
}
policyQualifierId = ASN1ObjectIdentifier.getInstance(as.getObjectAt(0));
qualifier = as.getObjectAt(1);
}
示例15: IssuerAndSerialNumber
import org.bouncycastle.asn1.ASN1Sequence; //導入方法依賴的package包/類
/**
* @deprecated use getInstance() method.
* @param seq
*/
public IssuerAndSerialNumber(
ASN1Sequence seq)
{
this.name = X500Name.getInstance(seq.getObjectAt(0));
this.serialNumber = (ASN1Integer)seq.getObjectAt(1);
}