implemented encryptionSeparator getter

This commit is contained in:
Václav Šmejkal 2022-06-18 18:30:06 +02:00
parent 1a5b58edf9
commit fdd41f35a5
No known key found for this signature in database
GPG Key ID: FD749A97DF2D5E19
2 changed files with 3 additions and 3 deletions

View File

@ -53,7 +53,7 @@ outputFlags decryptText(char *text, char *keyNew, inputFlags flags)
//GET LENGTH OF returningText AND textKeyChain //GET LENGTH OF returningText AND textKeyChain
for (int i = 0; i < strlen(text); i++) for (int i = 0; i < strlen(text); i++)
{ {
if (text[i] == ENCRYPTION_SEPARATOR) numberBuffer++; if (text[i] == getEncryptionSeparator()) numberBuffer++;
} }
//SET LENGTH (numberBuffer) //SET LENGTH (numberBuffer)
@ -73,7 +73,7 @@ outputFlags decryptText(char *text, char *keyNew, inputFlags flags)
//GET LENGTH OF EACH CHARACTER //GET LENGTH OF EACH CHARACTER
for (int j = 0; j < strlen(text); j++) for (int j = 0; j < strlen(text); j++)
{ {
if (text[j] == ENCRYPTION_SEPARATOR) break; if (text[j] == getEncryptionSeparator()) break;
numberBuffer++; numberBuffer++;
} }

View File

@ -126,7 +126,7 @@ outputFlags encryptText(char *text, char *keyNew, inputFlags flags)
if (i != strlen(text) - 1) if (i != strlen(text) - 1)
{ {
textBuffer = realloc(textBuffer, 2); textBuffer = realloc(textBuffer, 2);
sprintf(textBuffer, "%c", ENCRYPTION_SEPARATOR); sprintf(textBuffer, "%c", getEncryptionSeparator());
strcat(returningText, textBuffer); strcat(returningText, textBuffer);
} }