projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This commit ties the new DSO code (crypto/dso/) into the build for a
[openssl.git]
/
crypto
/
des
/
speed.c
diff --git
a/crypto/des/speed.c
b/crypto/des/speed.c
index f9497093e33cfdf1067cc19615e85621c9a31926..814b86f4aee517cb4177bdce8d350f050d5d0d38 100644
(file)
--- a/
crypto/des/speed.c
+++ b/
crypto/des/speed.c
@@
-64,12
+64,11
@@
#endif
#include <stdio.h>
#endif
#include <stdio.h>
-#ifndef MSDOS
-#include <unistd.h>
-#else
-#include <io.h>
-extern int exit();
-#endif
+
+#include <openssl/e_os2.h>
+#include OPENSSL_UNISTD_IO
+OPENSSL_DECLARE_EXIT
+
#include <signal.h>
#ifndef _IRIX
#include <time.h>
#include <signal.h>
#ifndef _IRIX
#include <time.h>
@@
-187,16
+186,16
@@
int main(int argc, char **argv)
#endif
#ifndef TIMES
#endif
#ifndef TIMES
- printf("To get the most acurate results, try to run this\n");
+ printf("To get the most ac
c
urate results, try to run this\n");
printf("program when this computer is idle.\n");
#endif
printf("program when this computer is idle.\n");
#endif
- des_set_key
((C_Block *)
key2,sch2);
- des_set_key
((C_Block *)
key3,sch3);
+ des_set_key
_unchecked(&
key2,sch2);
+ des_set_key
_unchecked(&
key3,sch3);
#ifndef SIGALRM
printf("First we calculate the approximate speed ...\n");
#ifndef SIGALRM
printf("First we calculate the approximate speed ...\n");
- des_set_key
((C_Block *)
key,sch);
+ des_set_key
_unchecked(&
key,sch);
count=10;
do {
long i;
count=10;
do {
long i;
@@
-226,7
+225,7
@@
int main(int argc, char **argv)
Time_F(START);
for (count=0,run=1; COND(ca); count++)
Time_F(START);
for (count=0,run=1; COND(ca); count++)
- des_set_key
((C_Block *)
key,sch);
+ des_set_key
_unchecked(&
key,sch);
d=Time_F(STOP);
printf("%ld set_key's in %.2f seconds\n",count,d);
a=((double)COUNT(ca))/d;
d=Time_F(STOP);
printf("%ld set_key's in %.2f seconds\n",count,d);
a=((double)COUNT(ca))/d;
@@
-258,8
+257,8
@@
int main(int argc, char **argv)
#endif
Time_F(START);
for (count=0,run=1; COND(cc); count++)
#endif
Time_F(START);
for (count=0,run=1; COND(cc); count++)
- des_ncbc_encrypt(
(C_Block *)buf,(C_Block *)
buf,BUFSIZE,&(sch[0]),
-
(C_Block *)&(key[0])
,DES_ENCRYPT);
+ des_ncbc_encrypt(
buf,
buf,BUFSIZE,&(sch[0]),
+
&key
,DES_ENCRYPT);
d=Time_F(STOP);
printf("%ld des_cbc_encrypt's of %ld byte blocks in %.2f second\n",
count,BUFSIZE,d);
d=Time_F(STOP);
printf("%ld des_cbc_encrypt's of %ld byte blocks in %.2f second\n",
count,BUFSIZE,d);
@@
-275,11
+274,11
@@
int main(int argc, char **argv)
#endif
Time_F(START);
for (count=0,run=1; COND(cd); count++)
#endif
Time_F(START);
for (count=0,run=1; COND(cd); count++)
- des_ede3_cbc_encrypt(
(C_Block *)buf,(C_Block *)
buf,BUFSIZE,
+ des_ede3_cbc_encrypt(
buf,
buf,BUFSIZE,
&(sch[0]),
&(sch2[0]),
&(sch3[0]),
&(sch[0]),
&(sch2[0]),
&(sch3[0]),
-
(C_Block *)&(key[0])
,
+
&key
,
DES_ENCRYPT);
d=Time_F(STOP);
printf("%ld des_ede_cbc_encrypt's of %ld byte blocks in %.2f second\n",
DES_ENCRYPT);
d=Time_F(STOP);
printf("%ld des_ede_cbc_encrypt's of %ld byte blocks in %.2f second\n",