本文整理了Java中org.spongycastle.asn1.ASN1Primitive.encodedLength()
方法的一些代码示例,展示了ASN1Primitive.encodedLength()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ASN1Primitive.encodedLength()
方法的具体详情如下:
包路径:org.spongycastle.asn1.ASN1Primitive
类名称:ASN1Primitive
方法名:encodedLength
[英]Return the length of the encoding this object will produce.
[中]返回此对象将产生的编码长度。
代码示例来源:origin: com.madgag.spongycastle/core
int encodedLength()
throws IOException
{
int length = 0;
for (Enumeration e = getObjects(); e.hasMoreElements();)
{
length += ((ASN1Encodable)e.nextElement()).toASN1Primitive().encodedLength();
}
return 2 + length + 2;
}
代码示例来源:origin: com.madgag.spongycastle/core
int encodedLength()
throws IOException
{
int length = 0;
for (Enumeration e = getObjects(); e.hasMoreElements();)
{
length += ((ASN1Encodable)e.nextElement()).toASN1Primitive().encodedLength();
}
return 2 + length + 2;
}
代码示例来源:origin: com.madgag/sc-light-jdk15on
int encodedLength()
throws IOException
{
int length = 0;
for (Enumeration e = getObjects(); e.hasMoreElements();)
{
length += ((ASN1Encodable)e.nextElement()).toASN1Primitive().encodedLength();
}
return 2 + length + 2;
}
代码示例来源:origin: com.madgag/sc-light-jdk15on
int encodedLength()
throws IOException
{
int length = 0;
for (Enumeration e = getObjects(); e.hasMoreElements();)
{
length += ((ASN1Encodable)e.nextElement()).toASN1Primitive().encodedLength();
}
return 2 + length + 2;
}
代码示例来源:origin: com.madgag.spongycastle/core
int encodedLength()
throws IOException
{
int length = 0;
for (Enumeration e = getObjects(); e.hasMoreElements();)
{
length += ((ASN1Encodable)e.nextElement()).toASN1Primitive().encodedLength();
}
return 2 + length + 2;
}
代码示例来源:origin: com.madgag/sc-light-jdk15on
int encodedLength()
throws IOException
{
int length = 0;
for (Enumeration e = getObjects(); e.hasMoreElements();)
{
length += ((ASN1Encodable)e.nextElement()).toASN1Primitive().encodedLength();
}
return 2 + length + 2;
}
代码示例来源:origin: com.madgag/sc-light-jdk15on
int encodedLength()
throws IOException
{
if (encoded != null)
{
return 1 + StreamUtil.calculateBodyLength(encoded.length) + encoded.length;
}
else
{
return super.toDLObject().encodedLength();
}
}
代码示例来源:origin: com.madgag.spongycastle/core
int encodedLength()
throws IOException
{
if (encoded != null)
{
return 1 + StreamUtil.calculateBodyLength(encoded.length) + encoded.length;
}
else
{
return super.toDLObject().encodedLength();
}
}
代码示例来源:origin: com.madgag.spongycastle/core
private int getBodyLength()
throws IOException
{
if (bodyLength < 0)
{
int length = 0;
for (Enumeration e = this.getObjects(); e.hasMoreElements();)
{
Object obj = e.nextElement();
length += ((ASN1Encodable)obj).toASN1Primitive().toDLObject().encodedLength();
}
bodyLength = length;
}
return bodyLength;
}
代码示例来源:origin: com.madgag/sc-light-jdk15on
private int getBodyLength()
throws IOException
{
if (bodyLength < 0)
{
int length = 0;
for (Enumeration e = this.getObjects(); e.hasMoreElements();)
{
Object obj = e.nextElement();
length += ((ASN1Encodable)obj).toASN1Primitive().toDLObject().encodedLength();
}
bodyLength = length;
}
return bodyLength;
}
代码示例来源:origin: com.madgag.spongycastle/core
private int getBodyLength()
throws IOException
{
if (bodyLength < 0)
{
int length = 0;
for (Enumeration e = this.getObjects(); e.hasMoreElements();)
{
Object obj = e.nextElement();
length += ((ASN1Encodable)obj).toASN1Primitive().toDERObject().encodedLength();
}
bodyLength = length;
}
return bodyLength;
}
代码示例来源:origin: com.madgag.spongycastle/core
private int getBodyLength()
throws IOException
{
if (bodyLength < 0)
{
int length = 0;
for (Enumeration e = this.getObjects(); e.hasMoreElements();)
{
Object obj = e.nextElement();
length += ((ASN1Encodable)obj).toASN1Primitive().toDERObject().encodedLength();
}
bodyLength = length;
}
return bodyLength;
}
代码示例来源:origin: com.madgag/sc-light-jdk15on
private int getBodyLength()
throws IOException
{
if (bodyLength < 0)
{
int length = 0;
for (Enumeration e = this.getObjects(); e.hasMoreElements();)
{
Object obj = e.nextElement();
length += ((ASN1Encodable)obj).toASN1Primitive().toDLObject().encodedLength();
}
bodyLength = length;
}
return bodyLength;
}
代码示例来源:origin: com.madgag/sc-light-jdk15on
private int getBodyLength()
throws IOException
{
if (bodyLength < 0)
{
int length = 0;
for (Enumeration e = this.getObjects(); e.hasMoreElements();)
{
Object obj = e.nextElement();
length += ((ASN1Encodable)obj).toASN1Primitive().toDERObject().encodedLength();
}
bodyLength = length;
}
return bodyLength;
}
代码示例来源:origin: com.madgag.spongycastle/core
private int getBodyLength()
throws IOException
{
if (bodyLength < 0)
{
int length = 0;
for (Enumeration e = this.getObjects(); e.hasMoreElements();)
{
Object obj = e.nextElement();
length += ((ASN1Encodable)obj).toASN1Primitive().toDLObject().encodedLength();
}
bodyLength = length;
}
return bodyLength;
}
代码示例来源:origin: com.madgag/sc-light-jdk15on
private int getBodyLength()
throws IOException
{
if (bodyLength < 0)
{
int length = 0;
for (Enumeration e = this.getObjects(); e.hasMoreElements();)
{
Object obj = e.nextElement();
length += ((ASN1Encodable)obj).toASN1Primitive().toDERObject().encodedLength();
}
bodyLength = length;
}
return bodyLength;
}
代码示例来源:origin: com.madgag.spongycastle/core
int encodedLength()
throws IOException
{
if (!empty)
{
ASN1Primitive primitive = obj.toASN1Primitive();
int length = primitive.encodedLength();
if (explicit)
{
return StreamUtil.calculateTagLength(tagNo) + StreamUtil.calculateBodyLength(length) + length;
}
else
{
// header length already in calculation
length = length - 1;
return StreamUtil.calculateTagLength(tagNo) + length;
}
}
else
{
return StreamUtil.calculateTagLength(tagNo) + 1;
}
}
代码示例来源:origin: com.madgag/sc-light-jdk15on
int encodedLength()
throws IOException
{
if (!empty)
{
ASN1Primitive primitive = obj.toASN1Primitive();
int length = primitive.encodedLength();
if (explicit)
{
return StreamUtil.calculateTagLength(tagNo) + StreamUtil.calculateBodyLength(length) + length;
}
else
{
// header length already in calculation
length = length - 1;
return StreamUtil.calculateTagLength(tagNo) + length;
}
}
else
{
return StreamUtil.calculateTagLength(tagNo) + 1;
}
}
代码示例来源:origin: com.madgag.spongycastle/core
int encodedLength()
throws IOException
{
if (!empty)
{
int length = obj.toASN1Primitive().toDLObject().encodedLength();
if (explicit)
{
return StreamUtil.calculateTagLength(tagNo) + StreamUtil.calculateBodyLength(length) + length;
}
else
{
// header length already in calculation
length = length - 1;
return StreamUtil.calculateTagLength(tagNo) + length;
}
}
else
{
return StreamUtil.calculateTagLength(tagNo) + 1;
}
}
代码示例来源:origin: com.madgag/sc-light-jdk15on
int encodedLength()
throws IOException
{
if (!empty)
{
int length = obj.toASN1Primitive().toDLObject().encodedLength();
if (explicit)
{
return StreamUtil.calculateTagLength(tagNo) + StreamUtil.calculateBodyLength(length) + length;
}
else
{
// header length already in calculation
length = length - 1;
return StreamUtil.calculateTagLength(tagNo) + length;
}
}
else
{
return StreamUtil.calculateTagLength(tagNo) + 1;
}
}
内容来源于网络,如有侵权,请联系作者删除!