mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-11-28 11:26:32 +03:00
Update subghz_keystore.c
This commit is contained in:
parent
a26dcd7bf7
commit
19e810a49d
@ -139,7 +139,7 @@ static bool subghz_keystore_read_file(SubGhzKeystore* instance, Stream* stream,
|
||||
if(furi_hal_crypto_decrypt(
|
||||
(uint8_t*)encrypted_line, (uint8_t*)decrypted_line, len)) {
|
||||
subghz_keystore_process_line(instance, decrypted_line);
|
||||
FURI_LOG_I(TAG, "decrypted line: %016lX", (uint64_t)decrypted_line);
|
||||
FURI_LOG_I(TAG, "decrypted line: %016lX", decrypted_line);
|
||||
} else {
|
||||
FURI_LOG_E(TAG, "Decryption failed");
|
||||
result = false;
|
||||
@ -579,9 +579,9 @@ bool subghz_keystore_raw_get_data(const char* file_name, size_t offset, uint8_t*
|
||||
buffer[i / 2] = (hi_nibble << 4) | lo_nibble;
|
||||
}
|
||||
|
||||
FURI_LOG_I(TAG, "decrypted line: %016lX", (uint64_t)decrypted_line);
|
||||
FURI_LOG_I(TAG, "decrypted line: %016lX", decrypted_line);
|
||||
memset(decrypted_line, 0, SUBGHZ_KEYSTORE_FILE_DECRYPTED_LINE_SIZE);
|
||||
FURI_LOG_I(TAG, "decrypted line: %016lX", (uint64_t)decrypted_line);
|
||||
FURI_LOG_I(TAG, "decrypted line: %016lX", decrypted_line);
|
||||
|
||||
if(!furi_hal_crypto_decrypt(
|
||||
(uint8_t*)buffer, (uint8_t*)decrypted_line, bufer_size / 2)) {
|
||||
@ -590,7 +590,7 @@ bool subghz_keystore_raw_get_data(const char* file_name, size_t offset, uint8_t*
|
||||
break;
|
||||
}
|
||||
memcpy(data, (uint8_t*)decrypted_line + (offset - (offset / 16) * 16), len);
|
||||
FURI_LOG_I(TAG, "decrypted line: %016lX", (uint64_t)decrypted_line);
|
||||
FURI_LOG_I(TAG, "decrypted line: %016lX", decrypted_line);
|
||||
|
||||
} while(0);
|
||||
furi_hal_crypto_store_unload_key(SUBGHZ_KEYSTORE_FILE_ENCRYPTION_KEY_SLOT);
|
||||
|
Loading…
Reference in New Issue
Block a user