Package org.webpki.cbor
Class CBORBigInt
java.lang.Object
org.webpki.cbor.CBORObject
org.webpki.cbor.CBORBigInt
- All Implemented Interfaces:
Cloneable,Comparable<CBORObject>
Class for holding CBOR
integer objects.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CBORBigIntcreateInt128(BigInteger value) Creates a CBORint128object.static CBORBigIntcreateUint128(BigInteger value) Creates a CBORuint128object.Methods inherited from class org.webpki.cbor.CBORObject
checkForUnread, clone, compareTo, encode, equals, getArray, getBigInteger, getBoolean, getBytes, getDateTime, getEpochTime, getExtendedFloat64, getFloat16, getFloat32, getFloat64, getInt128, getInt16, getInt32, getInt53, getInt64, getInt8, getMap, getSimple, getString, getTag, getUint128, getUint16, getUint32, getUint64, getUint8, hashCode, isNull, scan, toDiagnostic, toString
-
Constructor Details
-
CBORBigInt
Creates a CBORintegervalue of any size.Note: if
valueis within the CBORintrange,intencoding will be used, otherwisevaluewill be encoded as a CBORbigint.- Parameters:
value- Integer in BigInteger format- See Also:
-
-
Method Details
-
createInt128
Creates a CBORint128object.This method creates a
CBORBigIntobject, where the value is verified to be within-0x80000000000000000000000000000000to0x7fffffffffffffffffffffffffffffff.- Parameters:
value- Integer- Returns:
CBORBigIntobject- Throws:
CBORException- If value is out of range- See Also:
-
createUint128
Creates a CBORuint128object.This method creates a
CBORBigIntobject, where the value is verified to be within0to0xffffffffffffffffffffffffffffffff.- Parameters:
value- Integer- Returns:
CBORBigIntobject- Throws:
CBORException- If value is out of range- See Also:
-