From 133a564a7ba1f57ff229e7c181227d43b4bae584 Mon Sep 17 00:00:00 2001 From: Carlos Maiolino Date: Sat, 6 Sep 2025 11:12:35 +0200 Subject: Create ecat based on a lib archive Signed-off-by: Carlos Maiolino --- C/HF/chap8/src/libs/encrypt.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 C/HF/chap8/src/libs/encrypt.c (limited to 'C/HF/chap8/src/libs/encrypt.c') 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 + +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]); +} -- cgit v1.2.3