removed TEST_KEY & added more info for successful test
This commit is contained in:
parent
442c7f3175
commit
43ea16b596
@ -13,7 +13,6 @@
|
|||||||
#define VERSIONS_NAME "versions.json" //do I have to explain this?
|
#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_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
|
#define TEXT_TO_ENCRYPT "Some text yk" //THIS TEXT WILL BE ENCRYPTED IN why2-app BINARY
|
||||||
|
|
||||||
|
@ -9,18 +9,23 @@
|
|||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
char *buffer;
|
||||||
|
|
||||||
inputFlags flags =
|
inputFlags flags =
|
||||||
{
|
{
|
||||||
1, //SKIP CHECK
|
1, //SKIP CHECK
|
||||||
0, //NO OUTPUT
|
0, //NO OUTPUT
|
||||||
};
|
};
|
||||||
|
|
||||||
outputFlags encrypted = encryptText(TEST_TEXT, TEST_KEY, flags);
|
outputFlags encrypted = encryptText(TEST_TEXT, NULL, flags);
|
||||||
encrypted = decryptText(encrypted.outputText, TEST_KEY, flags);
|
|
||||||
|
buffer = encrypted.outputText; //GET ENCRYPTED TEXT
|
||||||
|
|
||||||
|
encrypted = decryptText(encrypted.outputText, encrypted.usedKey, flags);
|
||||||
|
|
||||||
if (strcmp(encrypted.outputText, TEST_TEXT) == 0)
|
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
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user