mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
fixed a lot of simulation issues
This commit is contained in:
parent
912a3e94e4
commit
81cd0474cb
10 changed files with 325 additions and 119 deletions
|
@ -12,6 +12,15 @@
|
|||
#include "util.h"
|
||||
#include "string.h"
|
||||
|
||||
uint32_t SwapBits(uint32_t value, int nrbits) {
|
||||
int i;
|
||||
uint32_t newvalue = 0;
|
||||
for(i = 0; i < nrbits; i++) {
|
||||
newvalue ^= ((value >> i) & 1) << (nrbits - 1 - i);
|
||||
}
|
||||
return newvalue;
|
||||
}
|
||||
|
||||
void num_to_bytes(uint64_t n, size_t len, uint8_t* dest)
|
||||
{
|
||||
while (len--) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue