Package com.webauthn4j.util
Class UnsignedNumberUtil
java.lang.Object
com.webauthn4j.util.UnsignedNumberUtil
A Utility class for unsigned number
-
Field Summary
Modifier and TypeFieldDescriptionstatic final short
static final long
static final BigInteger
static final int
-
Method Summary
Modifier and TypeMethodDescriptionstatic short
getUnsignedByte
(byte value) static long
getUnsignedInt
(@org.jetbrains.annotations.NotNull byte[] bytes) static long
getUnsignedInt
(@NotNull ByteBuffer byteBuffer) static @NotNull BigInteger
getUnsignedLong
(@NotNull ByteBuffer byteBuffer) static int
getUnsignedShort
(@org.jetbrains.annotations.NotNull byte[] bytes) static int
getUnsignedShort
(@NotNull ByteBuffer byteBuffer) static boolean
isWithinUnsignedByte
(int value) static boolean
isWithinUnsignedInt
(long value) static boolean
isWithinUnsignedLong
(@NotNull BigInteger value) static boolean
isWithinUnsignedShort
(int value) static @org.jetbrains.annotations.NotNull byte[]
toBytes
(int ushortValue) static @org.jetbrains.annotations.NotNull byte[]
toBytes
(long uintValue) static @org.jetbrains.annotations.NotNull byte[]
toBytes
(@NotNull BigInteger unsignedLongValue)
-
Field Details
-
UNSIGNED_BYTE_MAX
public static final short UNSIGNED_BYTE_MAX- See Also:
-
UNSIGNED_SHORT_MAX
public static final int UNSIGNED_SHORT_MAX- See Also:
-
UNSIGNED_INT_MAX
public static final long UNSIGNED_INT_MAX- See Also:
-
UNSIGNED_LONG_MAX
-
-
Method Details
-
getUnsignedByte
public static short getUnsignedByte(byte value) -
getUnsignedShort
-
getUnsignedShort
public static int getUnsignedShort(@NotNull @org.jetbrains.annotations.NotNull byte[] bytes) -
getUnsignedInt
-
getUnsignedInt
public static long getUnsignedInt(@NotNull @org.jetbrains.annotations.NotNull byte[] bytes) -
getUnsignedLong
-
toBytes
@NotNull public static @org.jetbrains.annotations.NotNull byte[] toBytes(int ushortValue) -
toBytes
@NotNull public static @org.jetbrains.annotations.NotNull byte[] toBytes(long uintValue) -
toBytes
@NotNull public static @org.jetbrains.annotations.NotNull byte[] toBytes(@NotNull @NotNull BigInteger unsignedLongValue) -
isWithinUnsignedByte
public static boolean isWithinUnsignedByte(int value) -
isWithinUnsignedShort
public static boolean isWithinUnsignedShort(int value) -
isWithinUnsignedInt
public static boolean isWithinUnsignedInt(long value) -
isWithinUnsignedLong
-