66 int main(
int argc,
char *argv[])
68 printf(
"No SHA support\n");
84 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
90 "0164b8a914cd2a5e74c4f7ff082c4d97f1edf880",
91 "d2516ee1acfa5baf33dfc1c471e438449ef134c8",
94 "3232affa48628a26653b5aaa44541fd90d690603";
98 "a9993e364706816aba3e25717850c26c9cd0d89d",
99 "84983e441c3bd26ebaae4aa1f95129e5e54670f1",
102 "34aa973cd4c4daa4f61eeb2bdbad27316534016f";
105 static char *
pt(
unsigned char *md);
106 int main(
int argc,
char *argv[])
110 static unsigned char buf[1000];
115 #ifdef CHARSET_EBCDIC
128 if (strcmp(p,(
char *)*R) != 0)
130 printf(
"error calculating SHA1 on '%s'\n",*P);
131 printf(
"got %s instead of %s\n",p,*R);
135 printf(
"test %d ok\n",i);
141 memset(buf,
'a',1000);
142 #ifdef CHARSET_EBCDIC
146 for (i=0; i<1000; i++)
152 if (strcmp(p,r) != 0)
154 printf(
"error calculating SHA1 on 'a' * 1000\n");
155 printf(
"got %s instead of %s\n",p,r);
159 printf(
"test 3 ok\n");
161 #ifdef OPENSSL_SYS_NETWARE
162 if (err) printf(
"ERROR: %d\n", err);
169 static char *
pt(
unsigned char *md)
175 sprintf(&(buf[i*2]),
"%02x",md[i]);