Reply To: Mifare 1K to HEX

Forum MIFARE general topics and applications Mifare 1K to HEX Reply To: Mifare 1K to HEX

Re: Mifare 1K to HEX

31. May 2017 at 15:47
Hi Mike,

You can use this function to get byte array, after that, you can convert byte array to the string hex value:

public static byte[] toByteArray(int data, int length){
byte[] byteArr = ByteBuffer.allocate(INT_LENGTH).putInt(data).array();
byteArr = Arrays.copyOfRange(byteArr, INT_LENGTH - length, INT_LENGTH);
return byteArr;

+ 0  |  - 0