Fix hex output

debugging
This commit is contained in:
r3df0xx 2022-04-01 09:54:29 +03:00
parent b3848de0b3
commit 844466c438
2 changed files with 6 additions and 6 deletions

View file

@ -132,9 +132,9 @@ static bool
FURI_LOG_I(TAG, "counter = %X", instance->generic.cnt);
FURI_LOG_I(TAG, "button = %X", btn);
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);
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++) {
@ -170,7 +170,7 @@ static bool
//Button 4
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
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];
p[3] = ~p[1];
p[1] = k;
FURI_LOG_I(TAG, "encrypted_data = %X", data);
FURI_LOG_I(TAG, "encrypted_data = %016llX", data);
return data;
}
@ -362,7 +362,7 @@ static uint64_t
p[1] = k;
}
}
FURI_LOG_I(TAG, "decrypted_data = %X", data);
FURI_LOG_I(TAG, "decrypted_data = %016llX", data);
return data;
}

View file

@ -587,7 +587,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: %X", decrypted_line);
FURI_LOG_I(TAG, "decrypted line: %016llX", decrypted_line);
} while(0);
furi_hal_crypto_store_unload_key(SUBGHZ_KEYSTORE_FILE_ENCRYPTION_KEY_SLOT);