diff options
| author | Carlos Maiolino <[email protected]> | 2025-09-25 15:26:57 +0200 |
|---|---|---|
| committer | Carlos Maiolino <[email protected]> | 2025-09-25 15:26:57 +0200 |
| commit | 29e2e93f3f32efa47e95f95260431167e228fe7a (patch) | |
| tree | 4961bbea472b0b98f29a5a82565c92aa3586d7a9 /C/HF/chap7/ecat.c | |
| parent | 4d1c070b813f3b3b64bd8bf96723756041840ac0 (diff) | |
chap7: add small programs made in chap7
Signed-off-by: Carlos Maiolino <[email protected]>
Diffstat (limited to 'C/HF/chap7/ecat.c')
| -rw-r--r-- | C/HF/chap7/ecat.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/C/HF/chap7/ecat.c b/C/HF/chap7/ecat.c index ec034e4..8ee5e6a 100644 --- a/C/HF/chap7/ecat.c +++ b/C/HF/chap7/ecat.c @@ -7,13 +7,15 @@ int main(int argc, char **argv) FILE *fd; char buf[80]; + encrypt_arr_t fn_arr = {xor16, xor42, xor64}; if (argc != 2) return 1; + printf("Arr size: %ld\n", sizeof(fn_arr) / sizeof(*fn_arr)); fd = fopen(argv[1], "r"); while (fgets(buf, 80, fd)) { - encrypt(buf, xor64); + encrypt_arr(buf, fn_arr, 3); printf("%s", buf); } |
