java.lang.Object | |
↳ | sun.security.util.BigInt |
A low-overhead arbitrary-precision unsigned integer. This is intended for use with ASN.1 parsing, and printing of such parsed values. Convert to "BigInteger" if you need to do arbitrary precision arithmetic, rather than just represent the number as a wrapped array of bytes.
NOTE: This class may eventually disappear, to be supplanted by big-endian byte arrays which hold both signed and unsigned arbitrary-precision integers.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a "Big" integer from a set of (big-endian) bytes.
| |||||||||||
Constructs a "Big" integer from a "BigInteger", which must be
positive (or zero) in value.
| |||||||||||
Constructs a "Big" integer from a normal Java integer.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns true iff the parameter is numerically equivalent.
| |||||||||||
Returns true iff the parameter is a numerically equivalent
BigInt.
| |||||||||||
Returns a hashcode for this BigInt.
| |||||||||||
Returns a BigInteger value which supports many arithmetic
operations.
| |||||||||||
Returns the data as a byte array.
| |||||||||||
Converts the "big" integer to a java primitive integer.
| |||||||||||
Returns a hexadecimal printed representation.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Constructs a "Big" integer from a set of (big-endian) bytes. Leading zeroes should be stripped off.
data | a sequence of bytes, most significant bytes/digits first. CONSUMED. |
---|
Constructs a "Big" integer from a "BigInteger", which must be positive (or zero) in value.
Constructs a "Big" integer from a normal Java integer.
i | the java primitive integer |
---|
Returns true iff the parameter is numerically equivalent.
other | the BigInt being compared with this one. |
---|
Returns true iff the parameter is a numerically equivalent BigInt.
other | the object being compared with this one. |
---|
true
if this object is the same as the obj
argument; false
otherwise.Returns a hashcode for this BigInt.
Returns a BigInteger value which supports many arithmetic operations. Assumes negative values will never occur.
Returns the data as a byte array. The most significant bit
of the array is bit zero (as in java.math.BigInteger
).
Converts the "big" integer to a java primitive integer.
Returns a hexadecimal printed representation. The value is formatted to fit on lines of at least 75 characters, with embedded newlines. Words are separated for readability, with eight words (32 bytes) per line.