/* Collection of code snippets by Arne Vajhøj */
/* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) */
#include <stdio.h>

#include "aes.h"

int main()
{
   char text[16] = "Der var engang",crypttext[16],plaintext[16];
   char key[] = "hemmelig";
   aes_context ctx;
   aes_set_key(&ctx,key,128);
   aes_encrypt(&ctx,text,crypttext);
   aes_decrypt(&ctx,crypttext,plaintext);
   printf("%s -> %2X%2X%2X%2X... -> %s\n",text,crypttext[0],crypttext[1],crypttext[2],crypttext[3],plaintext);
   return 0;
}
