Add .md5/.sha1/.sha256/.sha512 check file feature.

Hotkey m is for calculate checksum and print the result.
If also exist a .md5/.sha1/.sha256/.sha512 file, then it will check the result with the value in the file.
The .md5/.sha1/.sha256/.sha512 suffix is appended to the original file name not replace the original suffix.
For example:
/ISO/Ubuntu-20.04-amd64-desktop.iso
/ISO/Ubuntu-20.04-amd64-desktop.iso.md5
This commit is contained in:
longpanda 2021-10-24 18:52:09 +08:00
parent 836e1aa11e
commit a93b0f6656
3 changed files with 118 additions and 26 deletions

View file

@ -1484,7 +1484,7 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_open
{
AsciiStrCpyS(OldName, sizeof(OldName), g_img_replace_list[i].old_file_name[j]);
if ((0 == AsciiStrCmp(OldName, TmpName)) ||
(AsciiStrnCmp(OldName, "\\loader\\entries", 15) == 0 &&
(AsciiStrnCmp(OldName, "\\loader\\entries\\", 16) == 0 &&
AsciiStrCmp(OldName + 16, TmpName) == 0
)
)