I wonder if there is a Java implementation of Monero addresses validation code somewhere?
I've found this JS implementation which seems to work well:
and, an online version:
But I've been unable to make a Java port of this code. As soon as I try ot decode the address to a
byte, using tools such as this one, I get a different array than the one from the JS lib.
For example, this Monero test address: "
The JS lib decodes it to (as an Hex string):
When I try to do the samething in Java using:
byte decoded = Base58.decode(address); String decodedStr = org.apache.commons.codec.binary.Hex.encodeHexString(decoded);