|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.bitcoin.core.Base58
public class Base58
Base58 is a way to encode Bitcoin addresses as numbers and letters. Note that this is not the same base58 as used by Flickr, which you may see reference to around the internet.
You may instead wish to work with VersionedChecksummedBytes, which adds support for testing the prefix
and suffix bytes commonly found in addresses.
Satoshi says: why base-58 instead of standard base-64 encoding?
| Field Summary | |
|---|---|
static char[] |
ALPHABET
|
| Constructor Summary | |
|---|---|
Base58()
|
|
| Method Summary | |
|---|---|
static byte[] |
decode(String input)
|
static byte[] |
decodeChecked(String input)
Uses the checksum in the last 4 bytes of the decoded data to verify the rest are correct. |
static BigInteger |
decodeToBigInteger(String input)
|
static String |
encode(byte[] input)
Encodes the given bytes in base58. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final char[] ALPHABET
| Constructor Detail |
|---|
public Base58()
| Method Detail |
|---|
public static String encode(byte[] input)
public static byte[] decode(String input)
throws AddressFormatException
AddressFormatException
public static BigInteger decodeToBigInteger(String input)
throws AddressFormatException
AddressFormatException
public static byte[] decodeChecked(String input)
throws AddressFormatException
AddressFormatException - if the input is not base 58 or the checksum does not validate.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||