Class Base58Check

java.lang.Object
com.codename1.crypto.encoding.Base58Check

public final class Base58Check extends Object
Base58Check: Base58 text of a payload followed by the first four bytes of its double SHA-256 digest. Used for Bitcoin legacy addresses and WIF keys.
  • Method Details

    • encode

      public static String encode(byte[] payload)

      Appends the checksum to a payload and encodes the result.

      Parameters
      • payload: the version byte(s) and data
      Returns

      the Base58Check string

    • decode

      public static byte[] decode(String text)

      Decodes Base58Check text, verifies the checksum and strips it.

      Parameters
      • text: the Base58Check string
      Returns

      the payload without the checksum

      Throws
      • IllegalArgumentException: if the text is malformed, too short or the checksum is wrong