| | |
| | | import java.io.FileNotFoundException; |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.math.BigInteger; |
| | | import java.security.MessageDigest; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | private static final String SIGN_STR = "w@a!llokmet"; |
| | | |
| | | public static void main(String[] args) { |
| | | String applyOrderInfo = TRC20ApiUtils.getApplyOrderInfo("2020111140230002"); |
| | | System.out.println(applyOrderInfo); |
| | | public static void main(String[] args) throws NoSuchAlgorithmException { |
| | | // String applyOrderInfo = TRC20ApiUtils.getApplyOrderInfo("2020111140230002"); |
| | | // System.out.println(applyOrderInfo); |
| | | |
| | | md5Test(); |
| | | } |
| | | |
| | | private static void sign() { |
| | |
| | | TRC20ApiUtils.createWallet(1L, "111111", "USDT", "111111111"); |
| | | System.out.println(System.currentTimeMillis()); |
| | | } |
| | | |
| | | |
| | | |
| | | public static void md5Test() throws NoSuchAlgorithmException { |
| | | String str = "88" + "100.00000000" + "USDT" + "1" + TRC20ApiUtils.SIGN_STR; |
| | | MessageDigest md5 = MessageDigest.getInstance("md5"); |
| | | md5.update(str.getBytes()); |
| | | |
| | | str = new BigInteger(1, md5.digest()).toString(16); |
| | | |
| | | if (str.length() < 32) { |
| | | String str0 = ""; |
| | | for (int i = 0; i < 32 - str.length(); i++) { |
| | | str0 += "0"; |
| | | } |
| | | str = str0 + str; |
| | | } |
| | | System.out.println(str); |
| | | |
| | | } |
| | | } |