| | |
| | | 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() { |
| | |
| | | |
| | | @Test |
| | | public void addressInsertTest() throws IOException { |
| | | File file = new File("/Users/helius/Desktop/src20.xls"); |
| | | // String src = "/Users/helius/Desktop/src20.xls"; |
| | | String src = "C:/Users/wzy19/Desktop/ace2.xls"; |
| | | File file = new File(src); |
| | | FileInputStream input = new FileInputStream(file); |
| | | |
| | | Workbook wb = null; |
| | |
| | | |
| | | Sheet sheet = wb.getSheetAt(0); |
| | | int lastRowNum = sheet.getLastRowNum(); |
| | | for (int i = 0; i < lastRowNum; i++) { |
| | | for (int i = 0; i <= lastRowNum; i++) { |
| | | Row row = sheet.getRow(i); |
| | | Cell cell = row.getCell(0); |
| | | TrcAddressEntity addressEntity = new TrcAddressEntity(); |
| | |
| | | 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); |
| | | |
| | | } |
| | | } |