From 90bdf475c3a2be3817c3dad1a9a6779594f4757c Mon Sep 17 00:00:00 2001 From: Nikolay Minaylov Date: Sat, 16 Sep 2023 04:57:03 +0300 Subject: [PATCH] New random file name API fix (#40) --- .catalog/changelog.md | 12 ++++++++++++ application.fam | 2 +- picopass_device.h | 1 + scenes/picopass_scene_key_input.c | 2 +- scenes/picopass_scene_save_name.c | 5 +++-- 5 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 .catalog/changelog.md diff --git a/.catalog/changelog.md b/.catalog/changelog.md new file mode 100644 index 00000000000..cbac0cef7be --- /dev/null +++ b/.catalog/changelog.md @@ -0,0 +1,12 @@ +## 1.5 + - New random filename API +## 1.4 + - Optimize crypto speed to fix compatibliity with Signo and OmniKey readers +## 1.3 + - Show standard key instead of hex bytes when detected +## 1.2 + - Sentinel bit remove +## 1.1 + - Key dicts moved to app assets +## 1.0 + - Initial release diff --git a/application.fam b/application.fam index 58e470001a1..e11b88a9506 100644 --- a/application.fam +++ b/application.fam @@ -10,7 +10,7 @@ App( ], stack_size=4 * 1024, fap_description="App to communicate with NFC tags using the PicoPass(iClass) format", - fap_version="1.4", + fap_version="1.5", fap_icon="125_10px.png", fap_category="NFC", fap_libs=["mbedtls"], diff --git a/picopass_device.h b/picopass_device.h index 026421193d7..4cd4ba83c43 100644 --- a/picopass_device.h +++ b/picopass_device.h @@ -40,6 +40,7 @@ #define PICOPASS_APP_FOLDER ANY_PATH("picopass") #define PICOPASS_APP_EXTENSION ".picopass" +#define PICOPASS_APP_FILE_PREFIX "Picopass" #define PICOPASS_APP_SHADOW_EXTENSION ".pas" #define PICOPASS_DICT_KEY_BATCH_SIZE 10 diff --git a/scenes/picopass_scene_key_input.c b/scenes/picopass_scene_key_input.c index 97db466531f..f2a1f2dfbe1 100644 --- a/scenes/picopass_scene_key_input.c +++ b/scenes/picopass_scene_key_input.c @@ -1,5 +1,5 @@ #include "../picopass_i.h" -#include +#include #include #include diff --git a/scenes/picopass_scene_save_name.c b/scenes/picopass_scene_save_name.c index a80932f08c3..9cb14362298 100644 --- a/scenes/picopass_scene_save_name.c +++ b/scenes/picopass_scene_save_name.c @@ -1,5 +1,5 @@ #include "../picopass_i.h" -#include +#include #include #include @@ -16,7 +16,8 @@ void picopass_scene_save_name_on_enter(void* context) { TextInput* text_input = picopass->text_input; bool dev_name_empty = false; if(!strcmp(picopass->dev->dev_name, "")) { - set_random_name(picopass->text_store, sizeof(picopass->text_store)); + name_generator_make_auto( + picopass->text_store, sizeof(picopass->text_store), PICOPASS_APP_FILE_PREFIX); dev_name_empty = true; } else { picopass_text_store_set(picopass, picopass->dev->dev_name);