 22a4bac448
			
		
	
	
		22a4bac448
		
			
		
	
	
	
	
		
			
			* Core: wipe memory after free. RFID,iButton: fix iterator use after invalidation. * Debug: support unix wildcards for register matching in svd, update MCU description file and minify it. * Toolbox: getter for File in FlipperFile. * Makefile: conditional flashing * SubGhz: keeloq_mfcodes encryption tool. * FuriHal: proper IV handling on CBC in crypto. SubGhz: add support for encrypted keeloq keys. Makefile: move formatting to top Makefile. * SubGhz: rename some function names to match naming scheme. * SubGhz: encryption tool, fix windows line endings Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
		
			
				
	
	
		
			51 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include <m-string.h>
 | |
| #include <m-array.h>
 | |
| #include <stdint.h>
 | |
| 
 | |
| typedef struct {
 | |
|     string_t name;
 | |
|     uint64_t key;
 | |
|     uint16_t type;
 | |
| } SubGhzKey;
 | |
| 
 | |
| ARRAY_DEF(SubGhzKeyArray, SubGhzKey, M_POD_OPLIST)
 | |
| 
 | |
| #define M_OPL_SubGhzKeyArray_t() ARRAY_OPLIST(SubGhzKeyArray, M_POD_OPLIST)
 | |
| 
 | |
| typedef struct SubGhzKeystore SubGhzKeystore;
 | |
| 
 | |
| /** Allocate SubGhzKeystore
 | |
|  * 
 | |
|  * @return SubGhzKeystore* 
 | |
|  */
 | |
| SubGhzKeystore* subghz_keystore_alloc();
 | |
| 
 | |
| /** Free SubGhzKeystore
 | |
|  * 
 | |
|  * @param instance 
 | |
|  */
 | |
| void subghz_keystore_free(SubGhzKeystore* instance);
 | |
| 
 | |
| /** Loading manufacture key from file
 | |
|  * 
 | |
|  * @param instance - SubGhzKeystore instance
 | |
|  * @param filename - const char* full path to the file
 | |
|  */
 | |
| bool subghz_keystore_load(SubGhzKeystore* instance, const char* filename);
 | |
| 
 | |
| /** Save manufacture key to file
 | |
|  * 
 | |
|  * @param instance - SubGhzKeystore instance
 | |
|  * @param filename - const char* full path to the file
 | |
|  */
 | |
| bool subghz_keystore_save(SubGhzKeystore* instance, const char* filename, uint8_t* iv);
 | |
| 
 | |
| /** Get array of keys and names manufacture
 | |
|  * 
 | |
|  * @param instance - SubGhzKeystore instance
 | |
|  * @return SubGhzKeyArray_t*
 | |
|  */
 | |
| SubGhzKeyArray_t* subghz_keystore_get_data(SubGhzKeystore* instance);
 |