Skip to content

Commit

Permalink
making crypto code a private lib
Browse files Browse the repository at this point in the history
  • Loading branch information
xtruan committed Mar 12, 2023
1 parent ad40ecc commit 47890a1
Show file tree
Hide file tree
Showing 145 changed files with 24 additions and 21 deletions.
5 changes: 5 additions & 0 deletions application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ App(
order=10,
fap_icon="flipbip_10px.png",
fap_icon_assets="icons",
fap_private_libs=[
Lib(
name="crypto",
),
],
fap_category="Misc",
fap_description="Crypto toolkit for Flipper",
fap_author="Struan Clark (xtruan)",
Expand Down
5 changes: 3 additions & 2 deletions flipbip.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#include "flipbip.h"
#include "crypto/memzero.h"
#include "crypto/bip39.h"
#include "helpers/flipbip_file.h"
#include "helpers/flipbip_haptic.h"
// From: lib/crypto
#include <memzero.h>
#include <bip39.h>

bool flipbip_custom_event_callback(void* context, uint32_t event) {
furi_assert(context);
Expand Down
9 changes: 4 additions & 5 deletions helpers/flipbip_file.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#include "flipbip_file.h"
#include "../helpers/flipbip_string.h"

#include "../crypto/memzero.h"
#include "../crypto/rand.h"

#include <storage/storage.h>
#include "../helpers/flipbip_string.h"
// From: lib/crypto
#include <memzero.h>
#include <rand.h>

#define FLIPBIP_APP_BASE_FOLDER EXT_PATH("apps_data/flipbip")
#define FLIPBIP_DAT_FILE_NAME ".flipbip.dat"
Expand Down
3 changes: 0 additions & 3 deletions helpers/flipbip_led.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@


void flipbip_led_set_rgb(void* context, int red, int green, int blue);

void flipbip_led_reset(void* context);
6 changes: 3 additions & 3 deletions helpers/flipbip_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
#include <ctype.h>
#include <stdint.h>
#include <string.h>

#include "../crypto/memzero.h"
#include "../crypto/rc4.h"
// From: lib/crypto
#include <memzero.h>
#include <rc4.h>

char* flipbip_strtok(char* s, const char* delim) {
static char* last;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion scenes/flipbip_scene_settings.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "../flipbip.h"
#include "../crypto/memzero.h"
#include <lib/toolbox/value_index.h>
// From: lib/crypto
#include <memzero.h>

const char* const haptic_text[2] = {
"OFF",
Expand Down
14 changes: 7 additions & 7 deletions views/flipbip_scene_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
#include <gui/elements.h>
//#include <dolphin/dolphin.h>
#include <storage/storage.h>
#include <string.h>
#include "FlipBIP_icons.h"
#include "../helpers/flipbip_haptic.h"
#include "../helpers/flipbip_led.h"
#include "../helpers/flipbip_string.h"
#include "../helpers/flipbip_file.h"

#include <string.h>
#include "../crypto/rand.h"
#include "../crypto/bip32.h"
#include "../crypto/bip39.h"
#include "../crypto/curves.h"
#include "../crypto/memzero.h"
// From: /lib/crypto
#include <memzero.h>
#include <rand.h>
#include <curves.h>
#include <bip32.h>
#include <bip39.h>

#define DERIV_PURPOSE 44
#define DERIV_ACCOUNT 0
Expand Down

0 comments on commit 47890a1

Please sign in to comment.