@@ -68,13 +68,14 @@ static bool picopass_device_save_file(
68
68
if (!flipper_format_write_uint32 (file , "Facility Code" , & fc , 1 )) break ;
69
69
if (!flipper_format_write_uint32 (file , "Card Number" , & cn , 1 )) break ;
70
70
if (!flipper_format_write_hex (
71
- file , "Credential" , pacs -> credential , PICOPASS_BLOCK_LEN ))
71
+ file , "Credential" , pacs -> credential , RFAL_PICOPASS_BLOCK_LEN ))
72
72
break ;
73
73
if (pacs -> pin_length > 0 ) {
74
- if (!flipper_format_write_hex (file , "PIN\t\t" , pacs -> pin0 , PICOPASS_BLOCK_LEN ))
74
+ if (!flipper_format_write_hex (
75
+ file , "PIN\t\t" , pacs -> pin0 , RFAL_PICOPASS_BLOCK_LEN ))
75
76
break ;
76
77
if (!flipper_format_write_hex (
77
- file , "PIN(cont.)\t" , pacs -> pin1 , PICOPASS_BLOCK_LEN ))
78
+ file , "PIN(cont.)\t" , pacs -> pin1 , RFAL_PICOPASS_BLOCK_LEN ))
78
79
break ;
79
80
}
80
81
}
@@ -88,7 +89,10 @@ static bool picopass_device_save_file(
88
89
for (size_t i = 0 ; i < app_limit ; i ++ ) {
89
90
furi_string_printf (temp_str , "Block %d" , i );
90
91
if (!flipper_format_write_hex (
91
- file , furi_string_get_cstr (temp_str ), AA1 [i ].data , PICOPASS_BLOCK_LEN )) {
92
+ file ,
93
+ furi_string_get_cstr (temp_str ),
94
+ AA1 [i ].data ,
95
+ RFAL_PICOPASS_BLOCK_LEN )) {
92
96
block_saved = false;
93
97
break ;
94
98
}
@@ -162,7 +166,7 @@ static bool picopass_device_load_data(PicopassDevice* dev, FuriString* path, boo
162
166
for (size_t i = 0 ; i < 6 ; i ++ ) {
163
167
furi_string_printf (temp_str , "Block %d" , i );
164
168
if (!flipper_format_read_hex (
165
- file , furi_string_get_cstr (temp_str ), AA1 [i ].data , PICOPASS_BLOCK_LEN )) {
169
+ file , furi_string_get_cstr (temp_str ), AA1 [i ].data , RFAL_PICOPASS_BLOCK_LEN )) {
166
170
block_read = false;
167
171
break ;
168
172
}
@@ -174,7 +178,7 @@ static bool picopass_device_load_data(PicopassDevice* dev, FuriString* path, boo
174
178
for (size_t i = 6 ; i < app_limit ; i ++ ) {
175
179
furi_string_printf (temp_str , "Block %d" , i );
176
180
if (!flipper_format_read_hex (
177
- file , furi_string_get_cstr (temp_str ), AA1 [i ].data , PICOPASS_BLOCK_LEN )) {
181
+ file , furi_string_get_cstr (temp_str ), AA1 [i ].data , RFAL_PICOPASS_BLOCK_LEN )) {
178
182
block_read = false;
179
183
break ;
180
184
}
@@ -338,9 +342,9 @@ ReturnCode picopass_device_parse_credential(PicopassBlock* AA1, PicopassPacs* pa
338
342
}
339
343
} else if (pacs -> encryption == PicopassDeviceEncryptionNone ) {
340
344
FURI_LOG_D (TAG , "No Encryption" );
341
- memcpy (pacs -> credential , AA1 [7 ].data , PICOPASS_BLOCK_LEN );
342
- memcpy (pacs -> pin0 , AA1 [8 ].data , PICOPASS_BLOCK_LEN );
343
- memcpy (pacs -> pin1 , AA1 [9 ].data , PICOPASS_BLOCK_LEN );
345
+ memcpy (pacs -> credential , AA1 [7 ].data , RFAL_PICOPASS_BLOCK_LEN );
346
+ memcpy (pacs -> pin0 , AA1 [8 ].data , RFAL_PICOPASS_BLOCK_LEN );
347
+ memcpy (pacs -> pin1 , AA1 [9 ].data , RFAL_PICOPASS_BLOCK_LEN );
344
348
} else if (pacs -> encryption == PicopassDeviceEncryptionDES ) {
345
349
FURI_LOG_D (TAG , "DES Encrypted" );
346
350
} else {
0 commit comments