added missing comments to why2-test

This commit is contained in:
Václav Šmejkal 2022-05-25 17:44:53 +02:00
parent a517ec48dd
commit 1303d3d220

View File

@ -6,21 +6,25 @@
int main(void)
{
//VARIABLES
char *buffer = malloc(64);
int exitCode = 0;
//FLAGS
inputFlags flags =
{
0, //SKIP CHECK
0, //NO OUTPUT
};
//ENCRYPT & DECRYPT
outputFlags encrypted = encryptText(TEST_TEXT, NULL, flags);
strcpy(buffer, encrypted.outputText); //GET ENCRYPTED TEXT
encrypted = decryptText(encrypted.outputText, encrypted.usedKey, flags);
//COMPARE DIFFERENCE
if (strcmp(encrypted.outputText, TEST_TEXT) == 0)
{
printf("Test successful!\n\nTEXT: %s\nOUTPUT: %s\nKEY: %s\n", TEST_TEXT, buffer, encrypted.usedKey);