replaced encryptionOperation usage with encryptionOperation getter

This commit is contained in:
Václav Šmejkal 2022-10-17 16:47:05 +02:00
parent 2a09a38acf
commit 187f11ed65
No known key found for this signature in database
GPG Key ID: FD749A97DF2D5E19
3 changed files with 2 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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