mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-25 14:22:27 +03:00
Fix hex output
debugging
This commit is contained in:
parent
b3848de0b3
commit
844466c438
@ -132,9 +132,9 @@ static bool
|
|||||||
FURI_LOG_I(TAG, "counter = %X", instance->generic.cnt);
|
FURI_LOG_I(TAG, "counter = %X", instance->generic.cnt);
|
||||||
FURI_LOG_I(TAG, "button = %X", btn);
|
FURI_LOG_I(TAG, "button = %X", btn);
|
||||||
uint64_t decrypt = (uint64_t)( (instance->generic.serial << 16) | (instance->generic.cnt) );
|
uint64_t decrypt = (uint64_t)( (instance->generic.serial << 16) | (instance->generic.cnt) );
|
||||||
FURI_LOG_I(TAG, "decrypt = %X", decrypt);
|
FURI_LOG_I(TAG, "decrypt = %016llX", decrypt);
|
||||||
uint64_t enc_part = (uint64_t)subghz_protocol_nice_flor_s_encrypt(decrypt, file_name);
|
uint64_t enc_part = (uint64_t)subghz_protocol_nice_flor_s_encrypt(decrypt, file_name);
|
||||||
FURI_LOG_I(TAG, "enc_part = %X", enc_part);
|
FURI_LOG_I(TAG, "enc_part = %016llX", enc_part);
|
||||||
|
|
||||||
for (int i = 0; i < 16; i++) {
|
for (int i = 0; i < 16; i++) {
|
||||||
|
|
||||||
@ -170,7 +170,7 @@ static bool
|
|||||||
//Button 4
|
//Button 4
|
||||||
instance->generic.data = ( (btn << 4) | ((0xF ^ btn ^ loops[3][i]) << 44) | (enc_part) );
|
instance->generic.data = ( (btn << 4) | ((0xF ^ btn ^ loops[3][i]) << 44) | (enc_part) );
|
||||||
}
|
}
|
||||||
FURI_LOG_I(TAG, "key = %X", instance->generic.data);
|
FURI_LOG_I(TAG, "key = %016llX", instance->generic.data);
|
||||||
|
|
||||||
//Send header
|
//Send header
|
||||||
for(uint8_t i = 35; i > 0; i--) {
|
for(uint8_t i = 35; i > 0; i--) {
|
||||||
@ -323,7 +323,7 @@ uint64_t subghz_protocol_nice_flor_s_encrypt(uint64_t data, const char* file_nam
|
|||||||
k = ~p[3];
|
k = ~p[3];
|
||||||
p[3] = ~p[1];
|
p[3] = ~p[1];
|
||||||
p[1] = k;
|
p[1] = k;
|
||||||
FURI_LOG_I(TAG, "encrypted_data = %X", data);
|
FURI_LOG_I(TAG, "encrypted_data = %016llX", data);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,7 +362,7 @@ static uint64_t
|
|||||||
p[1] = k;
|
p[1] = k;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FURI_LOG_I(TAG, "decrypted_data = %X", data);
|
FURI_LOG_I(TAG, "decrypted_data = %016llX", data);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -587,7 +587,7 @@ bool subghz_keystore_raw_get_data(const char* file_name, size_t offset, uint8_t*
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
memcpy(data, (uint8_t*)decrypted_line + (offset - (offset / 16) * 16), len);
|
memcpy(data, (uint8_t*)decrypted_line + (offset - (offset / 16) * 16), len);
|
||||||
FURI_LOG_I(TAG, "decrypted line: %X", decrypted_line);
|
FURI_LOG_I(TAG, "decrypted line: %016llX", decrypted_line);
|
||||||
|
|
||||||
} while(0);
|
} while(0);
|
||||||
furi_hal_crypto_store_unload_key(SUBGHZ_KEYSTORE_FILE_ENCRYPTION_KEY_SLOT);
|
furi_hal_crypto_store_unload_key(SUBGHZ_KEYSTORE_FILE_ENCRYPTION_KEY_SLOT);
|
||||||
|
Loading…
Reference in New Issue
Block a user