A little bit of update, guy on stackoverflow gave me some pointers although I haven't solved my problem yet. Here's how I send the response APDU:
byte[] hashBuffer = {
(byte)0xe6, (byte)0x8d, (byte)0x3f, (byte)0x57,
(byte)0x40, (byte)0x09, (byte)0xcb, (byte)0xbe,
(byte)0x01, (byte)0x11, (byte)0x50, (byte)0x26,
(byte)0x36, (byte)0x34, (byte)0xc5, (byte)0xc0
};
byte[] SW1 = {(byte)0x90};
byte[] SW2 = {(byte)0x00};
byte[] responseApdu = new byte[18];
System.arraycopy(hashBuffer, 0, responseApdu, 0, 16);
System.arraycopy(SW1, 0, responseApdu, 16, 1);
System.arraycopy(SW2, 0, responseApdu, 17, 1);
return responseApdu;
(I know I could make this way shorter up there but I like to separate my code).
Now this is what I get as the raw data on the arduino end of things:
2301416387649203190117803854521971921440
How do I get the hex values back from that? Basically uint8_t to hex conversion?
This is what I have right now but it's not working:
Serial.print("HEX: ");
char buffer[65];
for (int i = 0; i < sizeof(buffer); i++) {
sprintf(buffer, "%02X", (uint8_t)response[i]);
}
for (int i = 0; i < sizeof(buffer); i++) {
Serial.print(buffer[i]);
}
Serial.println(" ");
And it outputs a bunch of gibberish.