62 #include "../apps/apps.h"
75 #define BSIZE (8*1024)
83 unsigned char *buff=NULL,*bufsize=NULL;
87 char *hkey=NULL,*hiv=NULL;
88 int enc=1,printkey=0,i,base64=0;
91 char *inf=NULL,*outf=NULL;
92 BIO *
in=NULL,*
out=NULL,*b64=NULL,*benc=NULL,*rbio=NULL,*wbio=NULL;
93 #define PROG_NAME_SIZE 39
108 if (strcmp(*argv,
"-e") == 0)
110 if (strcmp(*argv,
"-in") == 0)
112 if (--argc < 1)
goto bad;
115 else if (strcmp(*argv,
"-out") == 0)
117 if (--argc < 1)
goto bad;
120 else if (strcmp(*argv,
"-d") == 0)
122 else if (strcmp(*argv,
"-v") == 0)
124 else if (strcmp(*argv,
"-debug") == 0)
126 else if (strcmp(*argv,
"-bufsize") == 0)
128 if (--argc < 1)
goto bad;
129 bufsize=(
unsigned char *)*(++argv);
153 for (n=0; *bufsize; bufsize++)
156 if ((i <=
'9') && (i >=
'0'))
165 if (*bufsize !=
'\0')
180 if ((buff == NULL) || (strbuf == NULL))
188 if ((in == NULL) || (out == NULL))
243 inl=
BIO_read(rbio,(
char *)buff,bsize);
245 if (
BIO_write(wbio,(
char *)buff,inl) != inl)