#ifndef HZ
# ifndef CLK_TCK
# ifndef _BSD_CLK_TCK_ /* FreeBSD hack */
-# ifndef VMS
-# define HZ 100.0
-# else /* VMS */
-# define HZ 100.0
-# endif
+# define HZ 100.0
# else /* _BSD_CLK_TCK_ */
# define HZ ((double)_BSD_CLK_TCK_)
# endif
int MAIN(int argc, char **argv)
{
unsigned char *buf=NULL,*buf2=NULL;
+ des_cblock *buf_as_des_cblock = NULL;
int ret=1;
#define ALGOR_NUM 14
#define SIZE_NUM 5
BIO_printf(bio_err,"out of memory\n");
goto end;
}
+ buf_as_des_cblock = (des_cblock *)buf;
if ((buf2=(unsigned char *)Malloc((int)BUFSIZE)) == NULL)
{
BIO_printf(bio_err,"out of memory\n");
#endif
#ifndef NO_DES
- des_set_key(key,sch);
- des_set_key(key2,sch2);
- des_set_key(key3,sch3);
+ des_set_key(&key,sch);
+ des_set_key(&key2,sch2);
+ des_set_key(&key3,sch3);
#endif
#ifndef NO_IDEA
idea_set_encrypt_key(key16,&idea_ks);
count*=2;
Time_F(START);
for (i=count; i; i--)
- des_ecb_encrypt(buf,buf, &(sch[0]),DES_ENCRYPT);
+ des_ecb_encrypt(buf_as_des_cblock,buf_as_des_cblock,
+ &(sch[0]),DES_ENCRYPT);
d=Time_F(STOP);
} while (d <3);
c[D_MD2][0]=count/10;
Time_F(START);
for (count=0,run=1; COND(c[D_CBC_DES][j]); count++)
des_ncbc_encrypt(buf,buf,lengths[j],sch,
- &(iv[0]),DES_ENCRYPT);
+ &iv,DES_ENCRYPT);
d=Time_F(STOP);
BIO_printf(bio_err,"%ld %s's in %.2fs\n",
count,names[D_CBC_DES],d);
for (count=0,run=1; COND(c[D_EDE3_DES][j]); count++)
des_ede3_cbc_encrypt(buf,buf,lengths[j],
sch,sch2,sch3,
- &(iv[0]),DES_ENCRYPT);
+ &iv,DES_ENCRYPT);
d=Time_F(STOP);
BIO_printf(bio_err,"%ld %s's in %.2fs\n",
count,names[D_EDE3_DES],d);
for (count=0,run=1; COND(c[D_CBC_IDEA][j]); count++)
idea_cbc_encrypt(buf,buf,
(unsigned long)lengths[j],&idea_ks,
- (unsigned char *)&(iv[0]),IDEA_ENCRYPT);
+ iv,IDEA_ENCRYPT);
d=Time_F(STOP);
BIO_printf(bio_err,"%ld %s's in %.2fs\n",
count,names[D_CBC_IDEA],d);
for (count=0,run=1; COND(c[D_CBC_RC2][j]); count++)
RC2_cbc_encrypt(buf,buf,
(unsigned long)lengths[j],&rc2_ks,
- (unsigned char *)&(iv[0]),RC2_ENCRYPT);
+ iv,RC2_ENCRYPT);
d=Time_F(STOP);
BIO_printf(bio_err,"%ld %s's in %.2fs\n",
count,names[D_CBC_RC2],d);
for (count=0,run=1; COND(c[D_CBC_RC5][j]); count++)
RC5_32_cbc_encrypt(buf,buf,
(unsigned long)lengths[j],&rc5_ks,
- (unsigned char *)&(iv[0]),RC5_ENCRYPT);
+ iv,RC5_ENCRYPT);
d=Time_F(STOP);
BIO_printf(bio_err,"%ld %s's in %.2fs\n",
count,names[D_CBC_RC5],d);
for (count=0,run=1; COND(c[D_CBC_BF][j]); count++)
BF_cbc_encrypt(buf,buf,
(unsigned long)lengths[j],&bf_ks,
- (unsigned char *)&(iv[0]),BF_ENCRYPT);
+ iv,BF_ENCRYPT);
d=Time_F(STOP);
BIO_printf(bio_err,"%ld %s's in %.2fs\n",
count,names[D_CBC_BF],d);
for (count=0,run=1; COND(c[D_CBC_CAST][j]); count++)
CAST_cbc_encrypt(buf,buf,
(unsigned long)lengths[j],&cast_ks,
- (unsigned char *)&(iv[0]),CAST_ENCRYPT);
+ iv,CAST_ENCRYPT);
d=Time_F(STOP);
BIO_printf(bio_err,"%ld %s's in %.2fs\n",
count,names[D_CBC_CAST],d);