本文整理了Java中org.bouncycastle.asn1.ASN1GeneralizedTime.getEncoded()
方法的一些代码示例,展示了ASN1GeneralizedTime.getEncoded()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ASN1GeneralizedTime.getEncoded()
方法的具体详情如下:
包路径:org.bouncycastle.asn1.ASN1GeneralizedTime
类名称:ASN1GeneralizedTime
方法名:getEncoded
暂无
代码示例来源:origin: org.xipki/ca-server
private static Extension createInvalidityDateExtension(Date invalidityDate) {
try {
ASN1GeneralizedTime asnTime = new ASN1GeneralizedTime(invalidityDate);
return new Extension(Extension.invalidityDate, false, asnTime.getEncoded());
} catch (IOException ex) {
throw new IllegalArgumentException("error encoding reason: " + ex.getMessage(), ex);
}
}
代码示例来源:origin: redfish64/TinyTravelTracker
private static ASN1Sequence createInvalidityDateExtension(ASN1GeneralizedTime invalidityDate)
{
ASN1EncodableVector v = new ASN1EncodableVector();
try
{
v.add(Extension.invalidityDate);
v.add(new DEROctetString(invalidityDate.getEncoded()));
}
catch (IOException e)
{
throw new IllegalArgumentException("error encoding reason: " + e);
}
return new DERSequence(v);
}
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
private static ASN1Sequence createInvalidityDateExtension(ASN1GeneralizedTime invalidityDate)
{
ASN1EncodableVector v = new ASN1EncodableVector();
try
{
v.add(Extension.invalidityDate);
v.add(new DEROctetString(invalidityDate.getEncoded()));
}
catch (IOException e)
{
throw new IllegalArgumentException("error encoding reason: " + e);
}
return new DERSequence(v);
}
}
代码示例来源:origin: org.xipki/cmpclient
ASN1GeneralizedTime time = new ASN1GeneralizedTime(invalidityDate);
extensions[1] = new Extension(Extension.invalidityDate, true,
new DEROctetString(time.getEncoded()));
内容来源于网络,如有侵权,请联系作者删除!