com.google.bitcoin.core
Class Base58

java.lang.Object
  extended by com.google.bitcoin.core.Base58

public class Base58
extends Object

A custom form of base58 is used to encode BitCoin addresses. Note that this is not the same base58 as used by Flickr, which you may see reference to around the internet.

Satoshi says: why base-58 instead of standard base-64 encoding?


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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base58

public Base58()
Method Detail

encode

public static String encode(byte[] input)

decode

public static byte[] decode(String input)
                     throws AddressFormatException
Throws:
AddressFormatException

decodeToBigInteger

public static BigInteger decodeToBigInteger(String input)
                                     throws AddressFormatException
Throws:
AddressFormatException

decodeChecked

public static byte[] decodeChecked(String input)
                            throws AddressFormatException
Uses the checksum in the last 4 bytes of the decoded data to verify the rest are correct. The checksum is removed from the returned data.

Throws:
AddressFormatException - if the input is not base 58 or the checksum does not validate.


Copyright © 2011. All Rights Reserved.