X-Git-Url: http://www.average.org/gitweb/?p=pam_pcsc_cr.git;a=blobdiff_plain;f=test_crypto.c;fp=test_crypto.c;h=695c4fe249fbe0178f434973ef82a397d36fac77;hp=0000000000000000000000000000000000000000;hb=3d841899fe8859b2ce6af8fdfd8fa961c7651425;hpb=740b870a7a4d1936991d856f5427e4c10c2c849a diff --git a/test_crypto.c b/test_crypto.c new file mode 100644 index 0000000..695c4fe --- /dev/null +++ b/test_crypto.c @@ -0,0 +1,45 @@ +#include +#include +#include +#include +#include "crypto.h" + +unsigned char pt[48] = "the quick brown fox jumps over a lazy dog"; +unsigned char key[16] = { +0x0f,0x65,0xd1,0x3a,0xfe,0xcb,0xc4,0xb9,0x52,0xb1,0x60,0xcf,0xe8,0x55,0x6a,0xdd +}; + +static void usage(const char const *cmd) +{ + fprintf(stderr, "usage: %s\n", cmd); +} + +#define printh(p,x) printh_f(p, x, sizeof(x)) +void printh_f(char *p, unsigned char *x, size_t l) +{ + int i; + printf("%s:", p); + for (i=0; i