diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2009-05-15 01:28:48 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2009-05-15 01:28:48 +0200 |
commit | 1bfb8007c22e14025a7308e371851130df94e93e (patch) | |
tree | 4904faf9d2664abf643e4230db5a8d4047b7660b /src/libcrypto/libaes/test_main_mac.c | |
parent | c628e3455d486e0ebc1b98e749f9b625a9e65523 (diff) | |
download | strongswan-1bfb8007c22e14025a7308e371851130df94e93e.tar.bz2 strongswan-1bfb8007c22e14025a7308e371851130df94e93e.tar.xz |
got rid of libcrypto
Diffstat (limited to 'src/libcrypto/libaes/test_main_mac.c')
-rw-r--r-- | src/libcrypto/libaes/test_main_mac.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/libcrypto/libaes/test_main_mac.c b/src/libcrypto/libaes/test_main_mac.c deleted file mode 100644 index eea47dc9c..000000000 --- a/src/libcrypto/libaes/test_main_mac.c +++ /dev/null @@ -1,30 +0,0 @@ -#include <stdio.h> -#include <sys/types.h> -#include <string.h> -#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; -} |