65 #ifdef OPENSSL_NO_HMAC
66 int main(
int argc,
char *argv[])
68 printf(
"No HMAC support\n");
73 #ifndef OPENSSL_NO_MD5
81 #ifndef OPENSSL_NO_MD5
84 unsigned char key[16];
86 unsigned char data[64];
88 unsigned char *digest;
92 "More text test vectors to stuff up EBCDIC machines :-)",
94 (
unsigned char *)
"e9139d1e6ee064ef8cf514fc7dc83e86",
95 },{ {0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
96 0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,},
100 (
unsigned char *)
"9294727a3638bb1c13f48ef8158bfc9d",
103 "what do ya want for nothing?",
105 (
unsigned char *)
"750c783e6ab0b503eaa86e310a5db738",
107 {0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
108 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,},
110 {0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,
111 0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,
112 0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,
113 0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,
114 0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,
115 0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,
118 (
unsigned char *)
"56be34521d144c88dbb8c733f0e8b3f6",
123 static char *
pt(
unsigned char *md);
124 int main(
int argc,
char *argv[])
126 #ifndef OPENSSL_NO_MD5
132 #ifdef OPENSSL_NO_MD5
133 printf(
"test skipped: MD5 disabled\n");
136 #ifdef CHARSET_EBCDIC
150 if (strcmp(p,(
char *)
test[i].digest) != 0)
152 printf(
"error calculating HMAC on %d entry'\n",i);
153 printf(
"got %s instead of %s\n",p,
test[i].digest);
157 printf(
"test %d ok\n",i);
164 #ifndef OPENSSL_NO_MD5
165 static char *
pt(
unsigned char *md)
171 sprintf(&(buf[i*2]),
"%02x",md[i]);