diff --git a/include/flags.h b/include/flags.h index 7f0ccb9..c6f5827 100644 --- a/include/flags.h +++ b/include/flags.h @@ -13,7 +13,6 @@ #define VERSIONS_NAME "versions.json" //do I have to explain this? #define TEST_TEXT "Pepa smrdí." //TEST TEXT FOR ENCRYPTION IN why2-test BINARY -#define TEST_KEY "lZwOBFvjJEmaYRIaKsALKLkSeJvXhFPbZIRNFbjQRNyiOuLTexhgOpObHzyQgNT" //TEST KEY FOR ENCRYPTION IN why2-test BINARY #define TEXT_TO_ENCRYPT "Some text yk" //THIS TEXT WILL BE ENCRYPTED IN why2-app BINARY diff --git a/src/lib/test/main.c b/src/lib/test/main.c index e7bfd62..6243368 100644 --- a/src/lib/test/main.c +++ b/src/lib/test/main.c @@ -9,18 +9,23 @@ int main(void) { + char *buffer; + inputFlags flags = { 1, //SKIP CHECK 0, //NO OUTPUT }; - outputFlags encrypted = encryptText(TEST_TEXT, TEST_KEY, flags); - encrypted = decryptText(encrypted.outputText, TEST_KEY, flags); + outputFlags encrypted = encryptText(TEST_TEXT, NULL, flags); + + buffer = encrypted.outputText; //GET ENCRYPTED TEXT + + encrypted = decryptText(encrypted.outputText, encrypted.usedKey, flags); if (strcmp(encrypted.outputText, TEST_TEXT) == 0) { - printf("Test successful!\n"); + printf("Test successful!\n\nTEXT: %s\nOUTPUT: %s\nKEY: %s\n", TEST_TEXT, buffer, encrypted.usedKey); } else {