class Base58Utils {

  public static String encodeWithCheck(final byte[] rawData) {
    if (null == rawData || rawData.length == 0) {
      return "";
    }
    final byte[] checkSum = calculateCheckSum(rawData);
    final byte[] rawTotal = new byte[rawData.length + CHECKSUM_LEN];
    System.arraycopy(rawData, 0, rawTotal, 0, rawData.length);
    System.arraycopy(checkSum, 0, rawTotal, rawTotal.length - CHECKSUM_LEN, CHECKSUM_LEN);
    return encode(rawTotal);
  }

}