Skip to content

Commit

Permalink
cleanup naming/types
Browse files Browse the repository at this point in the history
  • Loading branch information
xtruan committed Mar 6, 2023
1 parent 844569e commit 1424655
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The goal of this project is to see how much crypto functionality can be brought
- If you do not have one, download a Flipper Zero firmware to get the `fbt` build tool
- Plug your Flipper Zero in via USB
- Copy the contents of this folder into the `applications_user` folder of your firmware
- Modify the `site_scons/cc.scons` file in the Flipper Zero firmware to remove the `"-Wdouble-promotion"` warning and add the `"-Os"` flag
- Modify the `site_scons/cc.scons` file in the Flipper Zero firmware to add the `"-Os"` flag

Then run the command:
```
Expand Down
2 changes: 1 addition & 1 deletion helpers/flipbip_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ flipbip_strtok_r(char *s, const char *delim, char **last)


void
flipbip_itox(uint8_t i, char *str)
flipbip_btox(unsigned char i, char *str)
{
unsigned char n;

Expand Down
4 changes: 1 addition & 3 deletions helpers/flipbip_string.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#include <stdint.h>

char * flipbip_strtok(char *s, const char *delim);
char * flipbip_strtok_r(char *s, const char *delim, char **last);

void flipbip_itox(uint8_t i, char *str);
void flipbip_btox(unsigned char i, char *str);
4 changes: 2 additions & 2 deletions views/flipbip_scene_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static void flipbip_scene_1_draw_seed(FlipBipScene1Model* const model) {
char *seed_working = malloc(64 * 2 + 1);
// Convert the seed to a hex string
for (size_t i = 0; i < 64; i++) {
flipbip_itox(model->seed[i], seed_working + (i * 2));
flipbip_btox(model->seed[i], seed_working + (i * 2));
}

flipbip_scene_1_draw_generic(seed_working, 22);
Expand Down Expand Up @@ -165,7 +165,7 @@ static void flipbip_scene_1_draw_address(const HDNode* node, uint32_t addr_type,
memcpy(address, "0x", 2);
// Convert the hash to a hex string
for (size_t i = 0; i < 20; i++) {
flipbip_itox(buf[i], address + 2 + (i * 2));
flipbip_btox(buf[i], address + 2 + (i * 2));
}
flipbip_scene_1_draw_generic(address, 12);
memzero(address, 42 + 1);
Expand Down

0 comments on commit 1424655

Please sign in to comment.