hekate/nyx: update sha calls based on new bdk

This commit is contained in:
CTCaer
2026-01-06 22:59:53 +02:00
parent c9208593af
commit bb1087006a
5 changed files with 12 additions and 11 deletions

View File

@@ -228,7 +228,8 @@ static int _emmc_sd_copy_verify(emmc_tool_gui_t *gui, sdmmc_storage_t *storage,
return VERIF_STATUS_ERROR;
}
manual_system_maintenance(false);
se_calc_sha256(hashEm, NULL, bufEm, num << 9, 0, SHA_INIT_HASH, false);
se_sha_hash_256_async(hashEm, bufEm, num << 9);
f_lseek(&fp, (u64)sdFileSector << (u64)9);
if (f_read_fast(&fp, bufSd, num << 9))
@@ -248,8 +249,8 @@ static int _emmc_sd_copy_verify(emmc_tool_gui_t *gui, sdmmc_storage_t *storage,
return VERIF_STATUS_ERROR;
}
manual_system_maintenance(false);
se_calc_sha256_finalize(hashEm, NULL);
se_calc_sha256_oneshot(hashSd, bufSd, num << 9);
se_sha_hash_256_finalize(hashEm);
se_sha_hash_256_oneshot(hashSd, bufSd, num << 9);
res = memcmp(hashEm, hashSd, SE_SHA_256_SIZE / 2);
if (res)

View File

@@ -290,7 +290,7 @@ static lv_res_t _create_mbox_cal0(lv_obj_t *btn)
nx_emmc_cal0_t *cal0 = (nx_emmc_cal0_t *)cal0_buf;
u32 hash[8];
se_calc_sha256_oneshot(hash, (u8 *)&cal0->cfg_id1, cal0->body_size);
se_sha_hash_256_oneshot(hash, (u8 *)&cal0->cfg_id1, cal0->body_size);
s_printf(txt_buf,
"#FF8000 CAL0 Version:# %d\n"

View File

@@ -707,7 +707,7 @@ int hos_dump_cal0()
}
u32 hash[8];
se_calc_sha256_oneshot(hash, (u8 *)&cal0->cfg_id1, cal0->body_size);
se_sha_hash_256_oneshot(hash, (u8 *)&cal0->cfg_id1, cal0->body_size);
if (memcmp(hash, cal0->body_sha256, 0x20))
return 3;