| | |
| | | |
| | | import com.anyun.exam.lib.MyLog; |
| | | import com.anyun.exam.lib.util.ByteUtil; |
| | | import com.safeluck.aykj.utils.BytesUtils; |
| | | |
| | | /** |
| | | * MyApplication2 |
| | |
| | | String regx= "^\\d+"; |
| | | return str.matches(regx); |
| | | } |
| | | |
| | | public static void main(String []args){ |
| | | String str = "EB00020000031420010000000400A5"; |
| | | // String str = "7EEB00020000031420010000000400A5007E"; |
| | | String str1 = "EB000200000314200100000004030D00"; |
| | | // String str1 = "7EEB000200000314200100000004030D00D57E"; |
| | | String str2 = "EB000200000314200100000004035000"; |
| | | byte [] dtas=BytesUtils.hexStringToBytes(str); |
| | | byte checkcode = calCheckCode(dtas); |
| | | System.out.println(BytesUtils.toHexString(checkcode)); |
| | | } |
| | | } |