From a5298a8cbcc30953092897af52af36f727e94e5d Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Wed, 24 Jan 2024 14:04:19 +0100 Subject: [PATCH] created first old_gen_tkch function first version of tkch ever. I used this to send her my feelings. I couldn't do it normally cause I am loser, yk, so I used this fucking encryption. We're only friends now. But at least we talk to eachother. When she started ghosting me, I nearly hang myself. Thanks, Alex. Thanks that you are for me. I would have unalived myself if you haven't reposponded that time. Thanks so much. I still do love you. --- src/core/lib/utils/misc.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/core/lib/utils/misc.c b/src/core/lib/utils/misc.c index 75a500d..302cce5 100644 --- a/src/core/lib/utils/misc.c +++ b/src/core/lib/utils/misc.c @@ -54,6 +54,39 @@ int removeDirectory(char *path) return nftw(path, unlink_cb, 64, FTW_DEPTH | FTW_PHYS); } +//THESE old_gen_tkch_number FUNCTIONS ARE 'HISTORIC' FUNCTIONS, SO YOU CAN DECRYPT OLD TEXT +void old_generate_text_key_chain_first(char *key, int *text_key_chain, int text_key_chain_size) //FIRST VERSION EVER. GOOD OLD TIMES. OR NOT. IT REMINDS ME OF HER. this shit hurts, man +{ + int number_buffer; + int (*cb)(int, int); + + for (int i = 0; i < text_key_chain_size; i++) + { + number_buffer = i; + + //CHECK, IF number_buffer ISN'T GREATER THAN KEY_LENGTH AND CUT UNUSED LENGTH + while (number_buffer >= (int) why2_get_key_length()) + { + number_buffer -= why2_get_key_length(); + } + + //FILL text_key_chain + if ((number_buffer + 1) % 3 == 0) + { + cb = multiply_cb; + } else if ((number_buffer + 1) % 2 == 0) + { + cb = subtract_cb; + } else + { + cb = sum_cb; + } + + text_key_chain[i] = cb(key[number_buffer], key[number_buffer + 1]); + } +} + + enum WHY2_EXIT_CODES why2_check_version(void) //! CRASHES WHEN CALLED FROM CHAT STUFF { if (why2_get_flags().no_check) return WHY2_SUCCESS;