mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
fix: assign
This commit is contained in:
parent
0803e532cc
commit
142b3d8de5
1 changed files with 5 additions and 4 deletions
|
@ -428,8 +428,8 @@ void testPermute()
|
||||||
printarr("permuted", res, 8);
|
printarr("permuted", res, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
//These testcases are
|
// These testcases are
|
||||||
//{ UID , TEMP_KEY, DIV_KEY} using the specific key
|
// { UID , TEMP_KEY, DIV_KEY} using the specific key
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint8_t uid[8];
|
uint8_t uid[8];
|
||||||
|
@ -475,7 +475,7 @@ int testDES(Testcase testcase, mbedtls_des_context ctx_enc, mbedtls_des_context
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
bool des_getParityBitFromKey(uint8_t key)
|
bool des_getParityBitFromKey(uint8_t key)
|
||||||
{//The top 7 bits is used
|
{ // The top 7 bits is used
|
||||||
bool parity = ((key & 0x80) >> 7)
|
bool parity = ((key & 0x80) >> 7)
|
||||||
^ ((key & 0x40) >> 6) ^ ((key & 0x20) >> 5)
|
^ ((key & 0x40) >> 6) ^ ((key & 0x20) >> 5)
|
||||||
^ ((key & 0x10) >> 4) ^ ((key & 0x08) >> 3)
|
^ ((key & 0x10) >> 4) ^ ((key & 0x08) >> 3)
|
||||||
|
@ -676,7 +676,8 @@ static bool readKeyFile(uint8_t key[8]) {
|
||||||
bool retval = false;
|
bool retval = false;
|
||||||
|
|
||||||
//Test a few variants
|
//Test a few variants
|
||||||
char filename[30];
|
char filename[30] = {0};
|
||||||
|
|
||||||
if (fileExists("iclass_key.bin")){
|
if (fileExists("iclass_key.bin")){
|
||||||
sprintf(filename, "%s.bin", "iclass_key");
|
sprintf(filename, "%s.bin", "iclass_key");
|
||||||
} else if (fileExists("loclass/iclass_key.bin")){
|
} else if (fileExists("loclass/iclass_key.bin")){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue