mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
added the securememory simulator_recovery code by @Roel et al
This commit is contained in:
parent
1689a73101
commit
073e79553e
13 changed files with 3062 additions and 0 deletions
23
tools/cryptorf/util.c
Normal file
23
tools/cryptorf/util.c
Normal file
|
@ -0,0 +1,23 @@
|
|||
#include "util.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void num_to_bytes(uint64_t n, size_t len, byte_t* dst)
|
||||
{
|
||||
while (len--)
|
||||
{
|
||||
dst[len] = (byte_t)n;
|
||||
n >>= 8;
|
||||
}
|
||||
}
|
||||
|
||||
void print_bytes(const byte_t* pbtData, const size_t szLen) {
|
||||
size_t uiPos;
|
||||
for (uiPos=0; uiPos < szLen; uiPos++) {
|
||||
printf("%02x ",pbtData[uiPos]);
|
||||
if (uiPos>20){
|
||||
printf("...");
|
||||
break;
|
||||
}
|
||||
}
|
||||
printf("\n");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue