Skip to content

Commit

Permalink
New random file name API fix (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
nminaylov authored Sep 16, 2023
1 parent 7b3170a commit 90bdf47
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
12 changes: 12 additions & 0 deletions .catalog/changelog.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
1 change: 1 addition & 0 deletions picopass_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scenes/picopass_scene_key_input.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "../picopass_i.h"
#include <lib/toolbox/random_name.h>
#include <lib/toolbox/name_generator.h>
#include <gui/modules/validators.h>
#include <toolbox/path.h>

Expand Down
5 changes: 3 additions & 2 deletions scenes/picopass_scene_save_name.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "../picopass_i.h"
#include <lib/toolbox/random_name.h>
#include <lib/toolbox/name_generator.h>
#include <gui/modules/validators.h>
#include <toolbox/path.h>

Expand All @@ -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);
Expand Down

0 comments on commit 90bdf47

Please sign in to comment.