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


Java IssuerAndSerialNumber.getName方法代码示例

本文整理汇总了Java中org.bouncycastle.asn1.cms.IssuerAndSerialNumber.getName方法的典型用法代码示例。如果您正苦于以下问题:Java IssuerAndSerialNumber.getName方法的具体用法?Java IssuerAndSerialNumber.getName怎么用?Java IssuerAndSerialNumber.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.bouncycastle.asn1.cms.IssuerAndSerialNumber的用法示例。


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

示例1: getSenderPublicKeyInfo

import org.bouncycastle.asn1.cms.IssuerAndSerialNumber; //导入方法依赖的package包/类
private SubjectPublicKeyInfo getSenderPublicKeyInfo(AlgorithmIdentifier recKeyAlgId,
    OriginatorIdentifierOrKey originator)
    throws CMSException, IOException
{
    OriginatorPublicKey opk = originator.getOriginatorKey();
    if (opk != null)
    {
        return getPublicKeyInfoFromOriginatorPublicKey(recKeyAlgId, opk);
    }

    OriginatorId origID;

    IssuerAndSerialNumber iAndSN = originator.getIssuerAndSerialNumber();
    if (iAndSN != null)
    {
        origID = new OriginatorId(iAndSN.getName(), iAndSN.getSerialNumber().getValue());
    }
    else
    {
        SubjectKeyIdentifier ski = originator.getSubjectKeyIdentifier();

        origID = new OriginatorId(ski.getKeyIdentifier());
    }

    return getPublicKeyInfoFromOriginatorId(origID);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:27,代码来源:KeyAgreeRecipientInformation.java

示例2: KeyTransRecipientInformation

import org.bouncycastle.asn1.cms.IssuerAndSerialNumber; //导入方法依赖的package包/类
KeyTransRecipientInformation(
    KeyTransRecipientInfo   info,
    AlgorithmIdentifier     messageAlgorithm,
    CMSSecureReadable       secureReadable,
    AuthAttributesProvider  additionalData)
{
    super(info.getKeyEncryptionAlgorithm(), messageAlgorithm, secureReadable, additionalData);

    this.info = info;

    RecipientIdentifier r = info.getRecipientIdentifier();

    if (r.isTagged())
    {
        ASN1OctetString octs = ASN1OctetString.getInstance(r.getId());

        rid = new KeyTransRecipientId(octs.getOctets());
    }
    else
    {
        IssuerAndSerialNumber   iAnds = IssuerAndSerialNumber.getInstance(r.getId());

        rid = new KeyTransRecipientId(iAnds.getName(), iAnds.getSerialNumber().getValue());
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:26,代码来源:KeyTransRecipientInformation.java

示例3: SignerInformation

import org.bouncycastle.asn1.cms.IssuerAndSerialNumber; //导入方法依赖的package包/类
SignerInformation(
    SignerInfo          info,
    ASN1ObjectIdentifier contentType,
    CMSProcessable      content,
    byte[]              resultDigest)
{
    this.info = info;
    this.contentType = contentType;
    this.isCounterSignature = contentType == null;

    SignerIdentifier   s = info.getSID();

    if (s.isTagged())
    {
        ASN1OctetString octs = ASN1OctetString.getInstance(s.getId());

        sid = new SignerId(octs.getOctets());
    }
    else
    {
        IssuerAndSerialNumber   iAnds = IssuerAndSerialNumber.getInstance(s.getId());

        sid = new SignerId(iAnds.getName(), iAnds.getSerialNumber().getValue());
    }

    this.digestAlgorithm = info.getDigestAlgorithm();
    this.signedAttributeSet = info.getAuthenticatedAttributes();
    this.unsignedAttributeSet = info.getUnauthenticatedAttributes();
    this.encryptionAlgorithm = info.getDigestEncryptionAlgorithm();
    this.signature = info.getEncryptedDigest().getOctets();

    this.content = content;
    this.resultDigest = resultDigest;
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:35,代码来源:SignerInformation.java

示例4: readRecipientInfo

import org.bouncycastle.asn1.cms.IssuerAndSerialNumber; //导入方法依赖的package包/类
static void readRecipientInfo(List infos, KeyAgreeRecipientInfo info,
    AlgorithmIdentifier messageAlgorithm, CMSSecureReadable secureReadable, AuthAttributesProvider additionalData)
{
    ASN1Sequence s = info.getRecipientEncryptedKeys();

    for (int i = 0; i < s.size(); ++i)
    {
        RecipientEncryptedKey id = RecipientEncryptedKey.getInstance(
            s.getObjectAt(i));

        RecipientId rid;

        KeyAgreeRecipientIdentifier karid = id.getIdentifier();
        IssuerAndSerialNumber iAndSN = karid.getIssuerAndSerialNumber();

        if (iAndSN != null)
        {
            rid = new KeyAgreeRecipientId(iAndSN.getName(), iAndSN.getSerialNumber().getValue());
        }
        else
        {
            RecipientKeyIdentifier rKeyID = karid.getRKeyID();

            // Note: 'date' and 'other' fields of RecipientKeyIdentifier appear to be only informational

            rid = new KeyAgreeRecipientId(rKeyID.getSubjectKeyIdentifier().getOctets());
        }

        infos.add(new KeyAgreeRecipientInformation(info, rid, id.getEncryptedKey(), messageAlgorithm,
            secureReadable, additionalData));
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:33,代码来源:KeyAgreeRecipientInformation.java


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