Package com.webauthn4j.util
Class UnsignedNumberUtil
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.checkerframework.checker.nullness.qual.NonNull byte[] bytes) static longgetUnsignedInt(@NonNull ByteBuffer byteBuffer) static @NonNull BigIntegergetUnsignedLong(@NonNull ByteBuffer byteBuffer) static intgetUnsignedShort(@org.checkerframework.checker.nullness.qual.NonNull byte[] bytes) static intgetUnsignedShort(@NonNull ByteBuffer byteBuffer) static booleanisWithinUnsignedByte(int value) static booleanisWithinUnsignedInt(long value) static booleanisWithinUnsignedLong(@NonNull BigInteger value) static booleanisWithinUnsignedShort(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
-