From b0d8ed94fe9e74afb49fdf5f11e4add29879c65c Mon Sep 17 00:00:00 2001 From: Rene Mayrhofer Date: Thu, 12 Apr 2007 20:30:08 +0000 Subject: [svn-upgrade] Integrating new upstream version, strongswan (4.1.1) --- lib/libcrypto/libaes/test_main_mac.c | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 lib/libcrypto/libaes/test_main_mac.c (limited to 'lib/libcrypto/libaes/test_main_mac.c') diff --git a/lib/libcrypto/libaes/test_main_mac.c b/lib/libcrypto/libaes/test_main_mac.c deleted file mode 100644 index eea47dc9c..000000000 --- a/lib/libcrypto/libaes/test_main_mac.c +++ /dev/null @@ -1,30 +0,0 @@ -#include -#include -#include -#include "aes.h" -#include "aes_xcbc_mac.h" -#define STR "Hola guasssso c|mo estais ...012" -void print_hash(const __u8 *hash) { - printf("%08x %08x %08x %08x\n", - *(__u32*)(&hash[0]), - *(__u32*)(&hash[4]), - *(__u32*)(&hash[8]), - *(__u32*)(&hash[12])); -} -int main(int argc, char *argv[]) { - aes_block key= { 0xdeadbeef, 0xceedcaca, 0xcafebabe, 0xff010204 }; - __u8 hash[16]; - char *str = argv[1]; - aes_context_mac ctx; - if (str==NULL) { - fprintf(stderr, "pasame el str\n"); - return 255; - } - AES_xcbc_mac_set_key(&ctx, (__u8 *)&key, sizeof(key)); - AES_xcbc_mac_hash(&ctx, str, strlen(str), hash); - print_hash(hash); - str[2]='x'; - AES_xcbc_mac_hash(&ctx, str, strlen(str), hash); - print_hash(hash); - return 0; -} -- cgit v1.2.3