本文整理了Java中org.bouncycastle.asn1.ASN1Integer.getEncoded()
方法的一些代码示例,展示了ASN1Integer.getEncoded()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ASN1Integer.getEncoded()
方法的具体详情如下:
包路径:org.bouncycastle.asn1.ASN1Integer
类名称:ASN1Integer
方法名:getEncoded
暂无
代码示例来源:origin: kaikramer/keystore-explorer
private byte[] encodeDsaPublicKeyAsBitString(DSAPublicKey dsaPublicKey) throws IOException {
ASN1Integer publicKey = new ASN1Integer(dsaPublicKey.getY());
return publicKey.getEncoded(ASN1Encoding.DER);
}
}
代码示例来源:origin: kaikramer/keystore-explorer
private byte[] encodeDsaPublicKeyAsBitString(DSAPublicKey dsaPublicKey) throws SpkacException {
try {
ASN1Integer publicKey = new ASN1Integer(dsaPublicKey.getY());
return publicKey.getEncoded(ASN1Encoding.DER);
} catch (Exception ex) {
throw new SpkacException(res.getString("NoEncodeDsaPublicKey.exception.message"), ex);
}
}
代码示例来源:origin: redfish64/TinyTravelTracker
void encode(ASN1OutputStream out)
throws IOException
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
if (directReference != null)
{
baos.write(directReference.getEncoded(ASN1Encoding.DER));
}
if (indirectReference != null)
{
baos.write(indirectReference.getEncoded(ASN1Encoding.DER));
}
if (dataValueDescriptor != null)
{
baos.write(dataValueDescriptor.getEncoded(ASN1Encoding.DER));
}
DERTaggedObject obj = new DERTaggedObject(true, encoding, externalContent);
baos.write(obj.getEncoded(ASN1Encoding.DER));
out.writeEncoded(BERTags.CONSTRUCTED, BERTags.EXTERNAL, baos.toByteArray());
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
void encode(ASN1OutputStream out)
throws IOException
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
if (directReference != null)
{
baos.write(directReference.getEncoded(ASN1Encoding.DL));
}
if (indirectReference != null)
{
baos.write(indirectReference.getEncoded(ASN1Encoding.DL));
}
if (dataValueDescriptor != null)
{
baos.write(dataValueDescriptor.getEncoded(ASN1Encoding.DL));
}
DERTaggedObject obj = new DERTaggedObject(true, encoding, externalContent);
baos.write(obj.getEncoded(ASN1Encoding.DL));
out.writeEncoded(BERTags.CONSTRUCTED, BERTags.EXTERNAL, baos.toByteArray());
}
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
void encode(ASN1OutputStream out)
throws IOException
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
if (directReference != null)
{
baos.write(directReference.getEncoded(ASN1Encoding.DER));
}
if (indirectReference != null)
{
baos.write(indirectReference.getEncoded(ASN1Encoding.DER));
}
if (dataValueDescriptor != null)
{
baos.write(dataValueDescriptor.getEncoded(ASN1Encoding.DER));
}
DERTaggedObject obj = new DERTaggedObject(true, encoding, externalContent);
baos.write(obj.getEncoded(ASN1Encoding.DER));
out.writeEncoded(BERTags.CONSTRUCTED, BERTags.EXTERNAL, baos.toByteArray());
}
}
内容来源于网络,如有侵权,请联系作者删除!