java.lang.Object
com.webauthn4j.util.UnsignedNumberUtil
A Utility class for unsigned number
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortstatic final longstatic final BigIntegerstatic final int -
Method Summary
Modifier and TypeMethodDescriptionstatic shortgetUnsignedByte(byte value) static longgetUnsignedInt(@org.jetbrains.annotations.NotNull byte[] bytes) static longgetUnsignedInt(@NotNull ByteBuffer byteBuffer) static @NotNull BigIntegergetUnsignedLong(@NotNull ByteBuffer byteBuffer) static intgetUnsignedShort(@org.jetbrains.annotations.NotNull byte[] bytes) static intgetUnsignedShort(@NotNull ByteBuffer byteBuffer) static booleanisWithinUnsignedByte(int value) static booleanisWithinUnsignedInt(long value) static booleanisWithinUnsignedLong(@NotNull BigInteger value) static booleanisWithinUnsignedShort(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
-