本文整理匯總了Java中org.bouncycastle.asn1.x509.AlgorithmIdentifier.getInstance方法的典型用法代碼示例。如果您正苦於以下問題:Java AlgorithmIdentifier.getInstance方法的具體用法?Java AlgorithmIdentifier.getInstance怎麽用?Java AlgorithmIdentifier.getInstance使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.bouncycastle.asn1.x509.AlgorithmIdentifier
的用法示例。
在下文中一共展示了AlgorithmIdentifier.getInstance方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: OOBCertHash
import org.bouncycastle.asn1.x509.AlgorithmIdentifier; //導入方法依賴的package包/類
private OOBCertHash(ASN1Sequence seq)
{
int index = seq.size() - 1;
hashVal = DERBitString.getInstance(seq.getObjectAt(index--));
for (int i = index; i >= 0; i--)
{
ASN1TaggedObject tObj = (ASN1TaggedObject)seq.getObjectAt(i);
if (tObj.getTagNo() == 0)
{
hashAlg = AlgorithmIdentifier.getInstance(tObj, true);
}
else
{
certId = CertId.getInstance(tObj, true);
}
}
}
示例2: getDigestAlgorithm
import org.bouncycastle.asn1.x509.AlgorithmIdentifier; //導入方法依賴的package包/類
public AlgorithmIdentifier getDigestAlgorithm()
throws IOException
{
if (nextObject == null)
{
nextObject = seq.readObject();
}
if (nextObject instanceof ASN1TaggedObjectParser)
{
AlgorithmIdentifier obj = AlgorithmIdentifier.getInstance((ASN1TaggedObject)nextObject.toASN1Primitive(), false);
nextObject = null;
return obj;
}
return null;
}
示例3: POPOSigningKey
import org.bouncycastle.asn1.x509.AlgorithmIdentifier; //導入方法依賴的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));
}
示例4: EncryptedContentInfo
import org.bouncycastle.asn1.x509.AlgorithmIdentifier; //導入方法依賴的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);
}
}
示例5: PrivateKeyInfo
import org.bouncycastle.asn1.x509.AlgorithmIdentifier; //導入方法依賴的package包/類
/**
* @deprectaed use PrivateKeyInfo.getInstance()
* @param seq
*/
public PrivateKeyInfo(
ASN1Sequence seq)
{
Enumeration e = seq.getObjects();
BigInteger version = ((ASN1Integer)e.nextElement()).getValue();
if (version.intValue() != 0)
{
throw new IllegalArgumentException("wrong version for private key info");
}
algId = AlgorithmIdentifier.getInstance(e.nextElement());
privKey = ASN1OctetString.getInstance(e.nextElement());
if (e.hasMoreElements())
{
attributes = ASN1Set.getInstance((ASN1TaggedObject)e.nextElement(), false);
}
}
示例6: getMacAlgorithm
import org.bouncycastle.asn1.x509.AlgorithmIdentifier; //導入方法依賴的package包/類
public AlgorithmIdentifier getMacAlgorithm()
throws IOException
{
if (nextObject == null)
{
nextObject = seq.readObject();
}
if (nextObject != null)
{
ASN1SequenceParser o = (ASN1SequenceParser)nextObject;
nextObject = null;
return AlgorithmIdentifier.getInstance(o.toASN1Primitive());
}
return null;
}
示例7: SignedPublicKeyAndChallenge
import org.bouncycastle.asn1.x509.AlgorithmIdentifier; //導入方法依賴的package包/類
public SignedPublicKeyAndChallenge(byte[] bytes)
{
spkacSeq = toDERSequence(bytes);
pkac = PublicKeyAndChallenge.getInstance(spkacSeq.getObjectAt(0));
signatureAlgorithm =
AlgorithmIdentifier.getInstance(spkacSeq.getObjectAt(1));
signature = (DERBitString)spkacSeq.getObjectAt(2);
}
示例8: KEKRecipientInfo
import org.bouncycastle.asn1.x509.AlgorithmIdentifier; //導入方法依賴的package包/類
public KEKRecipientInfo(
ASN1Sequence seq)
{
version = (ASN1Integer)seq.getObjectAt(0);
kekid = KEKIdentifier.getInstance(seq.getObjectAt(1));
keyEncryptionAlgorithm = AlgorithmIdentifier.getInstance(seq.getObjectAt(2));
encryptedKey = (ASN1OctetString)seq.getObjectAt(3);
}
示例9: OtherHashAlgAndValue
import org.bouncycastle.asn1.x509.AlgorithmIdentifier; //導入方法依賴的package包/類
private OtherHashAlgAndValue(
ASN1Sequence seq)
{
if (seq.size() != 2)
{
throw new IllegalArgumentException("Bad sequence size: " + seq.size());
}
hashAlgorithm = AlgorithmIdentifier.getInstance(seq.getObjectAt(0));
hashValue = ASN1OctetString.getInstance(seq.getObjectAt(1));
}
示例10: BasicOCSPResponse
import org.bouncycastle.asn1.x509.AlgorithmIdentifier; //導入方法依賴的package包/類
private BasicOCSPResponse(
ASN1Sequence seq)
{
this.tbsResponseData = ResponseData.getInstance(seq.getObjectAt(0));
this.signatureAlgorithm = AlgorithmIdentifier.getInstance(seq.getObjectAt(1));
this.signature = (DERBitString)seq.getObjectAt(2);
if (seq.size() > 3)
{
this.certs = ASN1Sequence.getInstance((ASN1TaggedObject)seq.getObjectAt(3), true);
}
}
示例11: SignerInfo
import org.bouncycastle.asn1.x509.AlgorithmIdentifier; //導入方法依賴的package包/類
public SignerInfo(
ASN1Sequence seq)
{
Enumeration e = seq.getObjects();
version = (ASN1Integer)e.nextElement();
issuerAndSerialNumber = IssuerAndSerialNumber.getInstance(e.nextElement());
digAlgorithm = AlgorithmIdentifier.getInstance(e.nextElement());
Object obj = e.nextElement();
if (obj instanceof ASN1TaggedObject)
{
authenticatedAttributes = ASN1Set.getInstance((ASN1TaggedObject)obj, false);
digEncryptionAlgorithm = AlgorithmIdentifier.getInstance(e.nextElement());
}
else
{
authenticatedAttributes = null;
digEncryptionAlgorithm = AlgorithmIdentifier.getInstance(obj);
}
encryptedDigest = DEROctetString.getInstance(e.nextElement());
if (e.hasMoreElements())
{
unauthenticatedAttributes = ASN1Set.getInstance((ASN1TaggedObject)e.nextElement(), false);
}
else
{
unauthenticatedAttributes = null;
}
}
示例12: DigestedData
import org.bouncycastle.asn1.x509.AlgorithmIdentifier; //導入方法依賴的package包/類
private DigestedData(
ASN1Sequence seq)
{
this.version = (ASN1Integer)seq.getObjectAt(0);
this.digestAlgorithm = AlgorithmIdentifier.getInstance(seq.getObjectAt(1));
this.encapContentInfo = ContentInfo.getInstance(seq.getObjectAt(2));
this.digest = ASN1OctetString.getInstance(seq.getObjectAt(3));
}
示例13: PBMParameter
import org.bouncycastle.asn1.x509.AlgorithmIdentifier; //導入方法依賴的package包/類
private PBMParameter(ASN1Sequence seq)
{
salt = ASN1OctetString.getInstance(seq.getObjectAt(0));
owf = AlgorithmIdentifier.getInstance(seq.getObjectAt(1));
iterationCount = ASN1Integer.getInstance(seq.getObjectAt(2));
mac = AlgorithmIdentifier.getInstance(seq.getObjectAt(3));
}
示例14: CertificationRequest
import org.bouncycastle.asn1.x509.AlgorithmIdentifier; //導入方法依賴的package包/類
public CertificationRequest(
ASN1Sequence seq)
{
reqInfo = CertificationRequestInfo.getInstance(seq.getObjectAt(0));
sigAlgId = AlgorithmIdentifier.getInstance(seq.getObjectAt(1));
sigBits = (DERBitString)seq.getObjectAt(2);
}
示例15: SignerInfo
import org.bouncycastle.asn1.x509.AlgorithmIdentifier; //導入方法依賴的package包/類
/**
* @deprecated use getInstance() method.
*/
public SignerInfo(
ASN1Sequence seq)
{
Enumeration e = seq.getObjects();
version = (ASN1Integer)e.nextElement();
sid = SignerIdentifier.getInstance(e.nextElement());
digAlgorithm = AlgorithmIdentifier.getInstance(e.nextElement());
Object obj = e.nextElement();
if (obj instanceof ASN1TaggedObject)
{
authenticatedAttributes = ASN1Set.getInstance((ASN1TaggedObject)obj, false);
digEncryptionAlgorithm = AlgorithmIdentifier.getInstance(e.nextElement());
}
else
{
authenticatedAttributes = null;
digEncryptionAlgorithm = AlgorithmIdentifier.getInstance(obj);
}
encryptedDigest = DEROctetString.getInstance(e.nextElement());
if (e.hasMoreElements())
{
unauthenticatedAttributes = ASN1Set.getInstance((ASN1TaggedObject)e.nextElement(), false);
}
else
{
unauthenticatedAttributes = null;
}
}