public class Checksum extends Object
Constructor and Description |
---|
Checksum() |
Modifier and Type | Method and Description |
---|---|
static String |
addChecksum(String address)
Adds the checksum to the specified address.
|
static boolean |
isAddressWithChecksum(String address)
Check if specified address is an address with checksum.
|
static boolean |
isAddressWithoutChecksum(String address)
Check if specified address is an address without checksum.
|
static boolean |
isValidChecksum(String addressWithChecksum)
Determines whether the specified address with checksum has a valid checksum.
|
static String |
removeChecksum(String address)
Remove the checksum to the specified address.
|
public static String addChecksum(String address) throws ArgumentException
address
- The address without checksum.ArgumentException
- is thrown when the specified address is not an valid address.public static String removeChecksum(String address) throws ArgumentException
address
- The address with checksum.ArgumentException
- is thrown when the specified address is not an address with checksum.public static boolean isValidChecksum(String addressWithChecksum) throws ArgumentException
addressWithChecksum
- The address with checksum.true
if the specified address with checksum has a valid checksum [the specified address with checksum]; otherwise, false
.ArgumentException
- is thrown when the specified address is not an valid address.public static boolean isAddressWithChecksum(String address) throws ArgumentException
address
- The address to check.true
if the specified address is with checksum ; otherwise, false
.ArgumentException
- is thrown when the specified address is not an valid address.public static boolean isAddressWithoutChecksum(String address) throws ArgumentException
address
- The address to check.true
if the specified address is without checksum ; otherwise, false
.ArgumentException
- is thrown when the specified address is not an valid address.Copyright © 2018. All rights reserved.