Fix ROTR conflict

This commit is contained in:
Aaron Tulino (Aaronjamt)
2025-12-21 03:49:45 -07:00
parent 16ebc6c7f7
commit 2197d9fc9f
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -143,7 +143,7 @@ uint32_t ul_ev1_pwdgenC(const uint8_t *uid) {
memcpy(base, uid, 7);
for (int i = 0; i < 8; i++) {
pwd = base[i] + ROTR(pwd, 25) + ROTR(pwd, 10) - pwd;
pwd = base[i] + PM3_ROTR(pwd, 25) + PM3_ROTR(pwd, 10) - pwd;
}
return BSWAP_32(pwd);
}
+2 -2
View File
@@ -94,8 +94,8 @@ extern bool g_tearoff_enabled;
//#define RAMFUNC __attribute((long_call, section(".ramfunc")))
#define RAMFUNC __attribute((long_call, section(".ramfunc"))) __attribute__((target("arm")))
#ifndef ROTR
# define ROTR(x,n) (((uintmax_t)(x) >> (n)) | ((uintmax_t)(x) << ((sizeof(x) * 8) - (n))))
#ifndef PM3_ROTR
# define PM3_ROTR(x,n) (((uintmax_t)(x) >> (n)) | ((uintmax_t)(x) << ((sizeof(x) * 8) - (n))))
#endif
#ifndef PM3_ROTL