mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-23 21:34:35 +03:00
Add furi_hal_version_uid_default (Fix TOTP)
This commit is contained in:
parent
75ee4efa31
commit
6d433edc38
@ -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];
|
||||
}
|
||||
|
@ -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
|
||||
|
|
@ -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)));
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user