本文整理汇总了Java中org.bouncycastle.asn1.cmp.InfoTypeAndValue类的典型用法代码示例。如果您正苦于以下问题:Java InfoTypeAndValue类的具体用法?Java InfoTypeAndValue怎么用?Java InfoTypeAndValue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InfoTypeAndValue类属于org.bouncycastle.asn1.cmp包,在下文中一共展示了InfoTypeAndValue类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addGeneralInfo
import org.bouncycastle.asn1.cmp.InfoTypeAndValue; //导入依赖的package包/类
/**
* 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;
}
示例2: finaliseHeader
import org.bouncycastle.asn1.cmp.InfoTypeAndValue; //导入依赖的package包/类
private void finaliseHeader(AlgorithmIdentifier algorithmIdentifier)
{
hdrBuilder.setProtectionAlg(algorithmIdentifier);
if (!generalInfos.isEmpty())
{
InfoTypeAndValue[] genInfos = new InfoTypeAndValue[generalInfos.size()];
hdrBuilder.setGeneralInfo((InfoTypeAndValue[])generalInfos.toArray(genInfos));
}
}
示例3: isImplictConfirm
import org.bouncycastle.asn1.cmp.InfoTypeAndValue; //导入依赖的package包/类
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;
}
示例4: extract
import org.bouncycastle.asn1.cmp.InfoTypeAndValue; //导入依赖的package包/类
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;
}
示例5: getImplictConfirmGeneralInfo
import org.bouncycastle.asn1.cmp.InfoTypeAndValue; //导入依赖的package包/类
public static InfoTypeAndValue getImplictConfirmGeneralInfo() {
return new InfoTypeAndValue(CMPObjectIdentifiers.it_implicitConfirm, DERNull.INSTANCE);
}
示例6: buildInfoTypeAndValue
import org.bouncycastle.asn1.cmp.InfoTypeAndValue; //导入依赖的package包/类
public static InfoTypeAndValue buildInfoTypeAndValue(CmpUtf8Pairs utf8Pairs) {
ParamUtil.requireNonNull("utf8Pairs", utf8Pairs);
return new InfoTypeAndValue(CMPObjectIdentifiers.regInfo_utf8Pairs,
new DERUTF8String(utf8Pairs.encoded()));
}