| | |
| | | System.arraycopy(zero,9,balanceBytes,0,balanceBytes.length); |
| | | |
| | | userCard.balance = HexUtil.get16to10LowHigh(HexUtil.bytesToHex(balanceBytes)); |
| | | |
| | | byte[] addressCodeBytes = new byte[6]; |
| | | System.arraycopy(zero,13,addressCodeBytes,0,2); |
| | | System.arraycopy(two,11,addressCodeBytes,0,4); |
| | | System.arraycopy(two,11,addressCodeBytes,2,4); |
| | | userCard.addressCode = BcdUtil.bcdToStr(addressCodeBytes); |
| | | |
| | | int year = 0; |
| | |
| | | calendar.set(2000 + year, month, day, hour, minute, second); |
| | | byte[] initPeasantCodeBytes = new byte[16]; |
| | | System.arraycopy(one,10,initPeasantCodeBytes,0,5); |
| | | System.arraycopy(two,0,initPeasantCodeBytes,0,11); |
| | | System.arraycopy(two,0,initPeasantCodeBytes,5,11); |
| | | userCard.initPeasantCode = HexUtil.bytesToHex(initPeasantCodeBytes); |
| | | return userCard; |
| | | } |
| | |
| | | data[9] = bcdSecond; |
| | | } |
| | | byte[] initPeasantCodes = HexUtil.hexToByteArray(initPeasantCode); |
| | | System.arraycopy(initPeasantCodes, 5, data, 0, 5); |
| | | System.arraycopy(initPeasantCodes, 0, data, 10, 5); |
| | | data[15] = getByteSum(data); |
| | | return data; |
| | | } |