summaryrefslogtreecommitdiff
path: root/C/HF/chap8/src/libs/encrypt.c
diff options
context:
space:
mode:
authorCarlos Maiolino <[email protected]>2025-09-06 11:12:35 +0200
committerCarlos Maiolino <[email protected]>2025-09-06 11:12:35 +0200
commit133a564a7ba1f57ff229e7c181227d43b4bae584 (patch)
tree4377f34caf6abaa71621666aee3061e58c84f5d3 /C/HF/chap8/src/libs/encrypt.c
parent2c9056a23e1a55fd21a8e314c903d9325bffd62e (diff)
Create ecat based on a lib archive
Signed-off-by: Carlos Maiolino <[email protected]>
Diffstat (limited to 'C/HF/chap8/src/libs/encrypt.c')
-rw-r--r--C/HF/chap8/src/libs/encrypt.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/C/HF/chap8/src/libs/encrypt.c b/C/HF/chap8/src/libs/encrypt.c
new file mode 100644
index 0000000..d894cfc
--- /dev/null
+++ b/C/HF/chap8/src/libs/encrypt.c
@@ -0,0 +1,13 @@
+#include <libs/encrypt.h>
+
+void encrypt(char *message, encrypt_fn_t encrypt_fn) {
+ encrypt_fn(message);
+}
+
+void encrypt_arr(char *message, encrypt_arr_t fn_arr, int size)
+{
+ int i;
+
+ for (i = 0; i < size; i++)
+ encrypt(message, fn_arr[i]);
+}