26 #include <netcomm/worldinfo/encrypt.h>
27 #include <netcomm/worldinfo/decrypt.h>
35 using namespace fawkes;
37 #define MAXLENGTH 1200
40 main(
int argc,
char **argv)
45 (
const unsigned char *)
"QAIV123456");
47 (
const unsigned char *)
"QAIV123456");
50 char *input = (
char *)malloc(MAXLENGTH);
51 char *output = (
char *)malloc(MAXLENGTH);
56 strncpy(input,
"Test String 12345", MAXLENGTH);
57 printf(
"Plain text: %s\n", input);
60 long unsigned int bytes = e->
encrypt();
62 printf(
"Encrypted to %lu bytes ", bytes);
68 memset(output, 0, MAXLENGTH);
73 printf(
"Decrypted to %lu bytes: %s\n", bytes, output);
WorldInfo message decryptor.
size_t recommended_crypt_buffer_size()
Get recommended crypted buffer size.
void set_plain_buffer(void *buffer, size_t buffer_length)
Set plain buffer.
void set_crypt_buffer(void *buffer, size_t buffer_length)
Set crypted buffer.
void set_plain_buffer(void *buffer, size_t buffer_length)
Set plain buffer.
WorldInfo message encryptor.
void set_crypt_buffer(void *buffer, size_t buffer_length)
Set crypted buffer.