mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
rework cryptorf
This commit is contained in:
parent
9cbf6c441e
commit
9ade745f07
16 changed files with 693 additions and 985 deletions
|
@ -1,20 +1,20 @@
|
|||
#include "util.h"
|
||||
#include <stdio.h>
|
||||
#include "util.h"
|
||||
|
||||
void num_to_bytes(uint64_t n, size_t len, byte_t* dst)
|
||||
void num_to_bytes(uint64_t n, size_t len, uint8_t *dst)
|
||||
{
|
||||
while (len--)
|
||||
{
|
||||
dst[len] = (byte_t)n;
|
||||
while (len--) {
|
||||
dst[len] = (uint8_t)n;
|
||||
n >>= 8;
|
||||
}
|
||||
}
|
||||
|
||||
void print_bytes(const byte_t* pbtData, const size_t szLen) {
|
||||
void print_bytes(const uint8_t *pbtData, const size_t szLen)
|
||||
{
|
||||
size_t uiPos;
|
||||
for (uiPos=0; uiPos < szLen; uiPos++) {
|
||||
printf("%02x ",pbtData[uiPos]);
|
||||
if (uiPos>20){
|
||||
for (uiPos = 0; uiPos < szLen; uiPos++) {
|
||||
printf("%02x ", pbtData[uiPos]);
|
||||
if (uiPos > 20) {
|
||||
printf("...");
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue