mirror of
https://github.com/CTCaer/hekate
synced 2024-12-22 11:21:23 +00:00
nyx: Boost eMMC backup/restore verification times
This change allows SE to start verifying the first buffer while the 2nd is populated. Effectively cutting verification down to almost half.
This commit is contained in:
parent
6734513d47
commit
e1748a0727
1 changed files with 4 additions and 1 deletions
|
@ -228,6 +228,9 @@ static int _dump_emmc_verify(emmc_tool_gui_t *gui, sdmmc_storage_t *storage, u32
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
se_calc_sha256(hashEm, NULL, bufEm, num << 9, 0, SHA_INIT_HASH, false);
|
||||||
|
|
||||||
f_lseek(&fp, (u64)sdFileSector << (u64)9);
|
f_lseek(&fp, (u64)sdFileSector << (u64)9);
|
||||||
if (f_read_fast(&fp, bufSd, num << 9))
|
if (f_read_fast(&fp, bufSd, num << 9))
|
||||||
{
|
{
|
||||||
|
@ -246,7 +249,7 @@ static int _dump_emmc_verify(emmc_tool_gui_t *gui, sdmmc_storage_t *storage, u32
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
se_calc_sha256(hashEm, NULL, bufEm, num << 9, 0, SHA_INIT_HASH, true);
|
se_calc_sha256_finalize(hashEm, NULL);
|
||||||
se_calc_sha256(hashSd, NULL, bufSd, num << 9, 0, SHA_INIT_HASH, true);
|
se_calc_sha256(hashSd, NULL, bufSd, num << 9, 0, SHA_INIT_HASH, true);
|
||||||
res = memcmp(hashEm, hashSd, 0x10);
|
res = memcmp(hashEm, hashSd, 0x10);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue