mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-20 05:13:22 -07:00
improved version of "hf 14a mifare" command
with merge with utility nonce2key
This commit is contained in:
parent
4abe4f5867
commit
f89c705002
14 changed files with 1155 additions and 106 deletions
|
@ -30,3 +30,22 @@ char * sprint_hex(const uint8_t * data, const size_t len) {
|
|||
|
||||
return buf;
|
||||
}
|
||||
|
||||
void num_to_bytes(uint64_t n, size_t len, uint8_t* dest)
|
||||
{
|
||||
while (len--) {
|
||||
dest[len] = (uint8_t) n;
|
||||
n >>= 8;
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t bytes_to_num(uint8_t* src, size_t len)
|
||||
{
|
||||
uint64_t num = 0;
|
||||
while (len--)
|
||||
{
|
||||
num = (num << 8) | (*src);
|
||||
src++;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue