| | |
| | | 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; |
| | | } |