Java 类org.bouncycastle.asn1.cmp.InfoTypeAndValue 实例源码

项目:ipack    文件:ProtectedPKIMessageBuilder.java   
/**
 * Add a generalInfo data record to the header of the new message.
 *
 * @param genInfo the generalInfo data to be added.
 * @return the current builder instance.
 */
public ProtectedPKIMessageBuilder addGeneralInfo(InfoTypeAndValue genInfo)
{
    generalInfos.add(genInfo);

    return this;
}
项目:ipack    文件:ProtectedPKIMessageBuilder.java   
private void finaliseHeader(AlgorithmIdentifier algorithmIdentifier)
{
    hdrBuilder.setProtectionAlg(algorithmIdentifier);

    if (!generalInfos.isEmpty())
    {
        InfoTypeAndValue[] genInfos = new InfoTypeAndValue[generalInfos.size()];

        hdrBuilder.setGeneralInfo((InfoTypeAndValue[])generalInfos.toArray(genInfos));
    }
}
项目:xitk    文件:CmpUtil.java   
public static boolean isImplictConfirm(PKIHeader header) {
    ParamUtil.requireNonNull("header", header);

    InfoTypeAndValue[] regInfos = header.getGeneralInfo();
    if (regInfos == null) {
        return false;
    }

    for (InfoTypeAndValue regInfo : regInfos) {
        if (CMPObjectIdentifiers.it_implicitConfirm.equals(regInfo.getInfoType())) {
            return true;
        }
    }
    return false;
}
项目:xitk    文件:CmpUtil.java   
public static CmpUtf8Pairs extract(InfoTypeAndValue[] regInfos) {
    if (regInfos == null) {
        return null;
    }

    for (InfoTypeAndValue regInfo : regInfos) {
        if (CMPObjectIdentifiers.regInfo_utf8Pairs.equals(regInfo.getInfoType())) {
            String regInfoValue = ((ASN1String) regInfo.getInfoValue()).getString();
            return new CmpUtf8Pairs(regInfoValue);
        }
    }

    return null;
}
项目:gwt-crypto    文件:ProtectedPKIMessageBuilder.java   
/**
 * Add a generalInfo data record to the header of the new message.
 *
 * @param genInfo the generalInfo data to be added.
 * @return the current builder instance.
 */
public ProtectedPKIMessageBuilder addGeneralInfo(InfoTypeAndValue genInfo)
{
    generalInfos.add(genInfo);

    return this;
}
项目:gwt-crypto    文件:ProtectedPKIMessageBuilder.java   
private void finaliseHeader(AlgorithmIdentifier algorithmIdentifier)
{
    hdrBuilder.setProtectionAlg(algorithmIdentifier);

    if (!generalInfos.isEmpty())
    {
        InfoTypeAndValue[] genInfos = new InfoTypeAndValue[generalInfos.size()];

        hdrBuilder.setGeneralInfo((InfoTypeAndValue[])generalInfos.toArray(genInfos));
    }
}
项目:Aki-SSL    文件:ProtectedPKIMessageBuilder.java   
/**
 * Add a generalInfo data record to the header of the new message.
 *
 * @param genInfo the generalInfo data to be added.
 * @return the current builder instance.
 */
public ProtectedPKIMessageBuilder addGeneralInfo(InfoTypeAndValue genInfo)
{
    generalInfos.add(genInfo);

    return this;
}
项目:Aki-SSL    文件:ProtectedPKIMessageBuilder.java   
private void finaliseHeader(AlgorithmIdentifier algorithmIdentifier)
{
    hdrBuilder.setProtectionAlg(algorithmIdentifier);

    if (!generalInfos.isEmpty())
    {
        InfoTypeAndValue[] genInfos = new InfoTypeAndValue[generalInfos.size()];

        hdrBuilder.setGeneralInfo((InfoTypeAndValue[])generalInfos.toArray(genInfos));
    }
}
项目:irma_future_id    文件:ProtectedPKIMessageBuilder.java   
/**
 * Add a generalInfo data record to the header of the new message.
 *
 * @param genInfo the generalInfo data to be added.
 * @return the current builder instance.
 */
public ProtectedPKIMessageBuilder addGeneralInfo(InfoTypeAndValue genInfo)
{
    generalInfos.add(genInfo);

    return this;
}
项目:irma_future_id    文件:ProtectedPKIMessageBuilder.java   
private void finaliseHeader(AlgorithmIdentifier algorithmIdentifier)
{
    hdrBuilder.setProtectionAlg(algorithmIdentifier);

    if (!generalInfos.isEmpty())
    {
        InfoTypeAndValue[] genInfos = new InfoTypeAndValue[generalInfos.size()];

        hdrBuilder.setGeneralInfo((InfoTypeAndValue[])generalInfos.toArray(genInfos));
    }
}
项目:bc-java    文件:ProtectedPKIMessageBuilder.java   
/**
 * Add a generalInfo data record to the header of the new message.
 *
 * @param genInfo the generalInfo data to be added.
 * @return the current builder instance.
 */
public ProtectedPKIMessageBuilder addGeneralInfo(InfoTypeAndValue genInfo)
{
    generalInfos.add(genInfo);

    return this;
}
项目:bc-java    文件:ProtectedPKIMessageBuilder.java   
private void finaliseHeader(AlgorithmIdentifier algorithmIdentifier)
{
    hdrBuilder.setProtectionAlg(algorithmIdentifier);

    if (!generalInfos.isEmpty())
    {
        InfoTypeAndValue[] genInfos = new InfoTypeAndValue[generalInfos.size()];

        hdrBuilder.setGeneralInfo((InfoTypeAndValue[])generalInfos.toArray(genInfos));
    }
}
项目:xitk    文件:CmpUtil.java   
public static InfoTypeAndValue getImplictConfirmGeneralInfo() {
    return new InfoTypeAndValue(CMPObjectIdentifiers.it_implicitConfirm, DERNull.INSTANCE);
}
项目:xitk    文件:CmpUtil.java   
public static InfoTypeAndValue buildInfoTypeAndValue(CmpUtf8Pairs utf8Pairs) {
    ParamUtil.requireNonNull("utf8Pairs", utf8Pairs);
    return new InfoTypeAndValue(CMPObjectIdentifiers.regInfo_utf8Pairs,
            new DERUTF8String(utf8Pairs.encoded()));
}