Skip to content

Commit d69e2cb

Browse files
committed
add new apps
1 parent 0144591 commit d69e2cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+2894
-0
lines changed

ReadMe.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ The Flipper and its community wouldn't be as rich as it is without your contribu
216216
| USB Midi | ![Media Badge] | [by DrZlo13](https://github.com/DrZlo13/flipper-zero-usb-midi) | | ![None Badge] |
217217
| Video Player | ![Media Badge] | [by LTVA1](https://github.com/LTVA1/flipper-zero-video-player) | <- Follow link to download examples and learn how to convert videos | ![None Badge] |
218218
| Music Tracker | ![Media Badge] | [by DrZlo13](https://github.com/DrZlo13/flipper-zero-music-tracker) | | [![UFW Badge]](https://lab.flipper.net/apps/zero_tracker) |
219+
| The C Programming Language | ![Media Badge] | [by armixz](https://github.com/armixz/Flipper-Zero-The-C-Programming-Language) | | ![None Badge] |
220+
| Cryptography Dictionary | ![Media Badge] | [by armixz](https://github.com/armixz/Flipper-Zero-Crypto-Dictionary) | | ![None Badge] |
219221
| Mifare Fuzzer | ![NFC Badge] | [by spheeere98](https://github.com/spheeere98/mifare_fuzzer) | Fixed crash on exit. / Update!: Ported to new NFC API [by @Sil333033](https://github.com/Flipper-XFW/Xtreme-Firmware/commit/ac5744328a28b73fb5022ce7baaa4332a824a739) | [![UFW Badge]](https://lab.flipper.net/apps/mifare_fuzzer) |
220222
| Seader | ![NFC Badge] | [by bettse](https://github.com/bettse/seader/tree/main) | `Interface with a SAM from the Flipper Zero over UART` | [![Author Badge]](https://lab.flipper.net/apps/seader) |
221223
| VB Lab Migration Assistant | ![NFC Badge] | [by GMMan (cyanic)](https://github.com/GMMan/flipperzero-vb-migrate) | | [![Author Badge]](https://lab.flipper.net/apps/vb_migrate) |
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Prerequisites
2+
*.d
3+
4+
# Object files
5+
*.o
6+
*.ko
7+
*.obj
8+
*.elf
9+
10+
# Linker output
11+
*.ilk
12+
*.map
13+
*.exp
14+
15+
# Precompiled Headers
16+
*.gch
17+
*.pch
18+
19+
# Libraries
20+
*.lib
21+
*.a
22+
*.la
23+
*.lo
24+
25+
# Shared objects (inc. Windows DLLs)
26+
*.dll
27+
*.so
28+
*.so.*
29+
*.dylib
30+
31+
# Executables
32+
*.exe
33+
*.out
34+
*.app
35+
*.i*86
36+
*.x86_64
37+
*.hex
38+
39+
# Debug files
40+
*.dSYM/
41+
*.su
42+
*.idb
43+
*.pdb
44+
45+
# Kernel Module Compile Results
46+
*.mod*
47+
*.cmd
48+
.tmp_versions/
49+
modules.order
50+
Module.symvers
51+
Mkfile.old
52+
dkms.conf

non_catalog_apps/crypto_dictionary_book/LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Flipper-Zero-Crypto-Dictionary
2+
3+
Cryptography Dictionary is a comprehensive reference tool that provides detailed info on various algorithms.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#include "app.h"
2+
#include "../scenes/scenes.h"
3+
#include "../scenes/scene_manager.h"
4+
#include "../callbacks/callbacks.h"
5+
6+
App* app_alloc() {
7+
App* app = calloc(1, sizeof(App));
8+
app->file_stream = file_stream_alloc(furi_record_open(RECORD_STORAGE));
9+
if(!app->file_stream) {
10+
free(app);
11+
return NULL;
12+
}
13+
app->scene_manager = scene_manager_alloc(&scene_manager_handlers, app);
14+
app->view_dispatcher = view_dispatcher_alloc();
15+
view_dispatcher_enable_queue(app->view_dispatcher);
16+
view_dispatcher_set_event_callback_context(app->view_dispatcher, app);
17+
view_dispatcher_set_navigation_event_callback(
18+
app->view_dispatcher, back_event_callback);
19+
app->submenu = submenu_alloc();
20+
view_dispatcher_add_view(
21+
app->view_dispatcher, SubmenuView, submenu_get_view(app->submenu));
22+
app->widget = widget_alloc();
23+
view_dispatcher_add_view(
24+
app->view_dispatcher, WidgetView, widget_get_view(app->widget));
25+
return app;
26+
}
27+
28+
void app_free(App* app) {
29+
furi_assert(app);
30+
view_dispatcher_remove_view(app->view_dispatcher, SubmenuView);
31+
view_dispatcher_remove_view(app->view_dispatcher, WidgetView);
32+
scene_manager_free(app->scene_manager);
33+
view_dispatcher_free(app->view_dispatcher);
34+
submenu_free(app->submenu);
35+
widget_free(app->widget);
36+
stream_free(app->file_stream);
37+
free(app);
38+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#ifndef APP_H
2+
#define APP_H
3+
4+
#include <gui/gui.h>
5+
#include <gui/view_dispatcher.h>
6+
#include <gui/modules/widget.h>
7+
#include <gui/modules/submenu.h>
8+
#include <gui/modules/text_input.h>
9+
10+
#include <gui/scene_manager.h>
11+
#include <storage/filesystem_api_defines.h>
12+
#include <storage/storage.h>
13+
#include <toolbox/stream/stream.h>
14+
#include <toolbox/stream/file_stream.h>
15+
#include "../resource/resource.h"
16+
17+
typedef struct App {
18+
SceneManager* scene_manager;
19+
ViewDispatcher* view_dispatcher;
20+
Submenu* submenu;
21+
Widget* widget;
22+
const char* current_topic;
23+
size_t current_chapter_index;
24+
Stream* file_stream;
25+
} App;
26+
27+
28+
App* app_alloc();
29+
void app_free(App* app);
30+
31+
#endif // APP_H
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
App(
2+
appid="crypto_dict",
3+
name="Crypto Dictionary",
4+
apptype=FlipperAppType.EXTERNAL,
5+
entry_point="crypto_dict_app",
6+
requires=["gui", "storage"],
7+
stack_size=10 * 1024,
8+
fap_icon="icons/crypto_dict_icon.png",
9+
fap_category="Media",
10+
fap_icon_assets="icons",
11+
fap_file_assets="resources",
12+
fap_author="@armixz",
13+
fap_weburl="https://github.com/armixz/Flipper-Zero-Crypto-Dictionary",
14+
fap_version="0.1",
15+
fap_description="Cryptography Dictionary (Flipper Zero Edition)",
16+
)
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#include "dynamic_buffer.h"
2+
3+
void dynamic_buffer_init(DynamicBuffer* buffer, size_t initial_capacity) {
4+
buffer->data = malloc(initial_capacity);
5+
buffer->size = 0;
6+
buffer->capacity = buffer->data ? initial_capacity : 0;
7+
}
8+
9+
bool dynamic_buffer_grow(DynamicBuffer* buffer, size_t min_capacity) {
10+
size_t new_capacity = buffer->capacity > 0 ? buffer->capacity : 64;
11+
while(new_capacity < min_capacity) {
12+
new_capacity *= 2;
13+
}
14+
char* new_data = realloc(buffer->data, new_capacity);
15+
if(!new_data) return false;
16+
17+
buffer->data = new_data;
18+
buffer->capacity = new_capacity;
19+
return true;
20+
}
21+
22+
bool dynamic_buffer_append(DynamicBuffer* buffer, const char* src, size_t src_size) {
23+
if(buffer->size + src_size > buffer->capacity) {
24+
if(!dynamic_buffer_grow(buffer, buffer->size + src_size)) {
25+
return false;
26+
}
27+
}
28+
memcpy(buffer->data + buffer->size, src, src_size);
29+
buffer->size += src_size;
30+
return true;
31+
}
32+
33+
void dynamic_buffer_free(DynamicBuffer* buffer) {
34+
free(buffer->data);
35+
buffer->data = NULL;
36+
buffer->size = 0;
37+
buffer->capacity = 0;
38+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#ifndef DYNAMIC_BUFFER_H
2+
#define DYNAMIC_BUFFER_H
3+
4+
#include "../app/app.h"
5+
6+
typedef struct {
7+
char* data;
8+
size_t size;
9+
size_t capacity;
10+
} DynamicBuffer;
11+
12+
13+
void dynamic_buffer_init(DynamicBuffer* buffer, size_t initial_capacity);
14+
bool dynamic_buffer_grow(DynamicBuffer* buffer, size_t min_capacity);
15+
bool dynamic_buffer_append(DynamicBuffer* buffer, const char* src, size_t src_size);
16+
void dynamic_buffer_free(DynamicBuffer* buffer);
17+
18+
#endif // DYNAMIC_BUFFER_H

0 commit comments

Comments
 (0)