Add furi_hal_version_uid_default (Fix TOTP)

This commit is contained in:
ClaraCrazy 2023-06-04 10:48:46 +02:00
parent 75ee4efa31
commit 6d433edc38
4 changed files with 9 additions and 2 deletions

View File

@ -90,7 +90,7 @@ CryptoSeedIVResult
max_i = uid_size;
}
const uint8_t* uid = furi_hal_version_uid();
const uint8_t* uid = furi_hal_version_uid_default();
for(uint8_t i = 0; i < max_i; i++) {
plugin_state->iv[i] = plugin_state->iv[i] ^ uid[i];
}

View File

@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,28.2,,
Version,+,28.3,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,
@ -1481,6 +1481,7 @@ Function,+,furi_hal_version_get_otp_version,FuriHalVersionOtpVersion,
Function,-,furi_hal_version_init,void,
Function,-,furi_hal_version_set_name,void,const char*
Function,+,furi_hal_version_uid,const uint8_t*,
Function,+,furi_hal_version_uid_default,const uint8_t*,
Function,+,furi_hal_version_uid_size,size_t,
Function,-,furi_hal_vibro_init,void,
Function,+,furi_hal_vibro_on,void,_Bool

1 entry status name type params
2 Version + 28.2 28.3
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
1481 Function - furi_hal_version_init void
1482 Function - furi_hal_version_set_name void const char*
1483 Function + furi_hal_version_uid const uint8_t*
1484 Function + furi_hal_version_uid_default const uint8_t*
1485 Function + furi_hal_version_uid_size size_t
1486 Function - furi_hal_vibro_init void
1487 Function + furi_hal_vibro_on void _Bool

View File

@ -314,6 +314,10 @@ size_t furi_hal_version_uid_size() {
return 64 / 8;
}
const uint8_t* furi_hal_version_uid_default() {
return (const uint8_t*)UID64_BASE;
}
const uint8_t* furi_hal_version_uid() {
if(version_get_custom_name(NULL) != NULL) {
return (const uint8_t*)&(*((uint32_t*)version_get_custom_name(NULL)));

View File

@ -204,6 +204,8 @@ size_t furi_hal_version_uid_size();
*/
const uint8_t* furi_hal_version_uid();
const uint8_t* furi_hal_version_uid_default();
#ifdef __cplusplus
}
#endif