I'm trying to understand how the function encrypt works (linux), but event with this simple example is not working.
Any ideas?. Thank you.
#define _XOPEN_SOURCE
#include <unistd.h>
#include <stdlib.h>
#include <iostream>
#include <string>
int main()
{
const char key[64] = "12" ; /* bit pattern for key */
char txt[64] = "test encrypt"; /* bit pattern for messages */
// set Key
setkey(key);
// show original
std::cout << "Original text : " << txt << std::endl;
// encode
encrypt(txt, 0);
std::cout << "Encrypted : " << txt << std::endl;
// decode
encrypt(txt, 1);
std::cout << "UnEncrypted : " << txt << std::endl;
return 0;
}