Methods Summary |
---|
void | encode(DEROutputStream out)
out.writeEncoded(INTEGER, bytes);
|
public boolean | equals(java.lang.Object o)
if (!(o instanceof DERInteger))
{
return false;
}
DERInteger other = (DERInteger)o;
if (bytes.length != other.bytes.length)
{
return false;
}
for (int i = 0; i != bytes.length; i++)
{
if (bytes[i] != other.bytes[i])
{
return false;
}
}
return true;
|
public static org.bouncycastle.asn1.DERInteger | getInstance(java.lang.Object obj)return an integer from the passed in object
if (obj == null || obj instanceof DERInteger)
{
return (DERInteger)obj;
}
if (obj instanceof ASN1OctetString)
{
return new DERInteger(((ASN1OctetString)obj).getOctets());
}
if (obj instanceof ASN1TaggedObject)
{
return getInstance(((ASN1TaggedObject)obj).getObject());
}
throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
|
public static org.bouncycastle.asn1.DERInteger | getInstance(ASN1TaggedObject obj, boolean explicit)return an Integer from a tagged object.
return getInstance(obj.getObject());
|
public java.math.BigInteger | getPositiveValue()in some cases positive values get crammed into a space,
that's not quite big enough...
return new BigInteger(1, bytes);
|
public java.math.BigInteger | getValue()
return new BigInteger(bytes);
|
public int | hashCode()
int value = 0;
for (int i = 0; i != bytes.length; i++)
{
value ^= (bytes[i] & 0xff) << (i % 4);
}
return value;
|
public java.lang.String | toString()
return getValue().toString();
|