]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - common/protocols.c
CHG: reordered the "hf search" internal checks. The iclass check takes 4.5sec to...
[proxmark3-svn] / common / protocols.c
index ee8abaddcf65fbebcc559a65542411d08b522f28..50eaf4930334476591157dd41da5c84bb21edc1b 100644 (file)
@@ -1,4 +1,3 @@
-#include <strings.h>
 #include <string.h>
 #include <stdint.h>
 #include <stdarg.h>
 #include <string.h>
 #include <stdint.h>
 #include <stdarg.h>
@@ -7,24 +6,15 @@
 // ATA55xx shared presets & routines
 uint32_t GetT55xxClockBit(uint32_t clock) {
        switch (clock) {
 // ATA55xx shared presets & routines
 uint32_t GetT55xxClockBit(uint32_t clock) {
        switch (clock) {
-               case 128:
-                       return T55x7_BITRATE_RF_128;
-               case 100:
-                       return T55x7_BITRATE_RF_100;
-               case 64:
-                       return T55x7_BITRATE_RF_64;
-               case 50:
-                       return T55x7_BITRATE_RF_50;
-               case 40:
-                       return T55x7_BITRATE_RF_40;
-               case 32:
-                       return T55x7_BITRATE_RF_32;
-               case 16:
-                       return T55x7_BITRATE_RF_16;
-               case 8:
-                       return T55x7_BITRATE_RF_8;
-               default:
-                       return 0;
+               case 128: return T55x7_BITRATE_RF_128;
+               case 100: return T55x7_BITRATE_RF_100;
+               case  64: return T55x7_BITRATE_RF_64;
+               case  50: return T55x7_BITRATE_RF_50;
+               case  40: return T55x7_BITRATE_RF_40;
+               case  32: return T55x7_BITRATE_RF_32;
+               case  16: return T55x7_BITRATE_RF_16;
+               case   8: return T55x7_BITRATE_RF_8;
+               default : return 0;
        }
 }
 
        }
 }
 
@@ -41,7 +31,7 @@ typedef struct {
        uint8_t mem_config;     //[13]
        uint8_t eas;            //[14]
        uint8_t fuses;          //[15]
        uint8_t mem_config;     //[13]
        uint8_t eas;            //[14]
        uint8_t fuses;          //[15]
-}picopass_conf_block;
+} picopass_conf_block;
 
 
 typedef struct {
 
 
 typedef struct {
@@ -51,8 +41,7 @@ typedef struct {
        uint8_t key_d[8];
        uint8_t key_c[8];
        uint8_t app_issuer_area[8];
        uint8_t key_d[8];
        uint8_t key_c[8];
        uint8_t app_issuer_area[8];
-
-}picopass_hdr;
+} picopass_hdr;
 
 uint8_t isset(uint8_t val, uint8_t mask) {
        return (val & mask);
 
 uint8_t isset(uint8_t val, uint8_t mask) {
        return (val & mask);
Impressum, Datenschutz