// variables\r
int len; \r
uint32_t pos;\r
- uint8_t tmp4[4] = {0x00};\r
uint8_t par[1] = {0x00};\r
\r
// "random" reader nonce:\r
- byte_t nr[4] = {0x55, 0x41, 0x49, 0x92};\r
- //byte_t nr[4] = {0x01, 0x01, 0x01, 0x01};\r
+ //byte_t nr[4] = {0x55, 0x41, 0x49, 0x92};\r
+ byte_t nr[4] = {0x01, 0x01, 0x01, 0x01};\r
\r
uint32_t nt, ntpp; // Supplied tag nonce\r
\r
return 2;\r
}\r
\r
- memcpy(tmp4, receivedAnswer, 4);\r
ntpp = prng_successor(nt, 32) ^ crypto1_word(pcs, 0,0);\r
- \r
- if (ntpp != bytes_to_num(tmp4, 4)) {\r
+\r
+ if (ntpp != bytes_to_num(receivedAnswer, 4)) {\r
if (MF_DBGLEVEL >= 1) Dbprintf("Authentication failed. Error card response.");\r
return 3;\r
}\r