2008-12-05から1日間の記事一覧

opensslの暗号化を使う

ちょっとopensslの暗号化をさわる必要があったので、サンプルを書いてみた。 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <openssl/evp.h> #define KEYGEN_SALT NULL #define KEYGEN_COUNT 2048 static void print_hexstring(unsigned char *data, int datal) { int i; for (i </openssl/evp.h></string.h></stdlib.h></stdio.h>…