From 187f11ed657e52d8001ba3834640aa3f0d99573c Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Mon, 17 Oct 2022 16:47:05 +0200 Subject: [PATCH] replaced encryptionOperation usage with encryptionOperation getter --- include/flags.h | 3 --- src/lib/decrypter.c | 2 +- src/lib/encrypter.c | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/flags.h b/include/flags.h index a4b8b21..bc9c02b 100644 --- a/include/flags.h +++ b/include/flags.h @@ -66,7 +66,4 @@ void setEncryptionSeparator(char encryptionSeparatorNew); void setKeyLength(int keyLengthNew); void setFlags(inputFlags newFlags); //.... whatcha think? -//RANDOM SHIT THAT DOESN'T FIT IN MISC, SO I PUT IT IN HERE -int encryptionOperation(int text, int encryptedText); - #endif diff --git a/src/lib/decrypter.c b/src/lib/decrypter.c index 3b5990f..53bea37 100644 --- a/src/lib/decrypter.c +++ b/src/lib/decrypter.c @@ -109,7 +109,7 @@ outputFlags decryptText(char *text, char *keyNew) //DECRYPT TEXT for (int i = 0; i < textKeyChainLength; i++) { - textKeyChain[i] = encryptionOperation(textKeyChain[i], encryptedTextKeyChain[i]); + textKeyChain[i] = getEncryptionOperation()(textKeyChain[i], encryptedTextKeyChain[i]); } //FIX (CLEAN) returningText diff --git a/src/lib/encrypter.c b/src/lib/encrypter.c index f28a00f..cba7b64 100644 --- a/src/lib/encrypter.c +++ b/src/lib/encrypter.c @@ -90,7 +90,7 @@ outputFlags encryptText(char *text, char *keyNew) //ACTUALLY ENCRYPT TEXT for (int i = 0; i < (int) strlen(text); i++) { - textKeyChain[i] = encryptionOperation(textKeyChain[i], (int) text[i]); + textKeyChain[i] = getEncryptionOperation()(textKeyChain[i], (int) text[i]); } //COUNT REQUIRED SIZE FOR returningText