Class 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?
    • Don't want 0OIl characters that look the same in some fonts and could be used to create visually identical looking account numbers.
    • A string with non-alphanumeric characters is not as easily accepted as an account number.
    • E-mail usually won't line-break if there's no punctuation to break at.
    • Doubleclicking selects the whole number as one word if it's all alphanumeric.
    • Constructor Detail

      • Base58

        public Base58()
    • Method Detail

      • encode

        public static String encode​(byte[] input)
      • encodeChecked

        public static String encodeChecked​(byte[] payload)
        Encodes bytes as a base58 string. A checksum is appended.
        Parameters:
        payload - the bytes to encode, e.g. pubkey hash
        Returns:
        the base58-encoded string
      • doubleDigest

        public static byte[] doubleDigest​(byte[] input,
                                          int offset,
                                          int length)