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.checkerframework.checker.nullness.qual.NonNull byte[] bytes) static long
getUnsignedInt
(@NonNull ByteBuffer byteBuffer) static @NonNull BigInteger
getUnsignedLong
(@NonNull ByteBuffer byteBuffer) static int
getUnsignedShort
(@org.checkerframework.checker.nullness.qual.NonNull byte[] bytes) static int
getUnsignedShort
(@NonNull ByteBuffer byteBuffer) static boolean
isWithinUnsignedByte
(int value) static boolean
isWithinUnsignedInt
(long value) static boolean
isWithinUnsignedLong
(@NonNull BigInteger value) static boolean
isWithinUnsignedShort
(int value) static @org.checkerframework.checker.nullness.qual.NonNull byte[]
toBytes
(int ushortValue) static @org.checkerframework.checker.nullness.qual.NonNull byte[]
toBytes
(long uintValue) static @org.checkerframework.checker.nullness.qual.NonNull byte[]
toBytes
(@NonNull 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(@org.checkerframework.checker.nullness.qual.NonNull byte[] bytes) -
getUnsignedInt
-
getUnsignedInt
public static long getUnsignedInt(@org.checkerframework.checker.nullness.qual.NonNull byte[] bytes) -
getUnsignedLong
-
toBytes
public static @org.checkerframework.checker.nullness.qual.NonNull byte[] toBytes(int ushortValue) -
toBytes
public static @org.checkerframework.checker.nullness.qual.NonNull byte[] toBytes(long uintValue) -
toBytes
public static @org.checkerframework.checker.nullness.qual.NonNull byte[] toBytes(@NonNull BigInteger unsignedLongValue) -
isWithinUnsignedByte
public static boolean isWithinUnsignedByte(int value) -
isWithinUnsignedShort
public static boolean isWithinUnsignedShort(int value) -
isWithinUnsignedInt
public static boolean isWithinUnsignedInt(long value) -
isWithinUnsignedLong
-