Show MD5 and Length

This commit is contained in:
Alex 2022-11-06 02:41:51 +02:00
parent 28a1428cf3
commit 93eeb1f53b
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -3,6 +3,7 @@
#include <printf.h>
#include <uart.hpp>
#include <lock.hpp>
#include <md5.h>
NewLock(DumperLock);
@ -62,4 +63,10 @@ void DumpData(const char *Description, void *Address, unsigned long Length)
WriteRaw(" %s\n", Buffer);
WriteRaw("-------------------------------------------------------------------------\n");
WriteRaw("Length: %ld bytes", Length);
uint8_t *result = md5File(AddressChar, Length);
WriteRaw("MD5: ");
for (int i = 0; i < 16; i++)
WriteRaw("%02x", result[i]);
WriteRaw("\n-------------------------------------------------------------------------\n");
}