public final class Checksum extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
hexadecimal(String value)
Compute the checksum as hexadecimal string
The return value is a single hexadecimal char string
|
static @IntRange(from=0L,to=15L) int |
integer(String value)
Compute the checksum as integer
The returned value is in interval [0-16]
|
static boolean |
verify(String input,
int expectedChecksum)
Verify the checksum of the input value
|
static boolean |
verify(String input,
String expectedChecksum)
Verify the checksum of the input value
|
@Pure public static @IntRange(from=0L,to=15L) int integer(String value)
value - Value to compute@SideEffectFree public static String hexadecimal(String value)
value - Value to compute@Pure public static boolean verify(String input, int expectedChecksum)
input - The input value to checkexpectedChecksum - The expected checksum as intCopyright © 2022. All rights reserved.