OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions | Variables
des.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <openssl/opensslconf.h>
#include <time.h>
#include "des_ver.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <openssl/des.h>
#include <openssl/rand.h>
#include <openssl/ui_compat.h>

Go to the source code of this file.

Macros

#define EXIT(a)   exit(a)
 
#define BUFSIZE   (8*1024)
 
#define VERIFY   1
 
#define KEYSIZ   8
 
#define KEYSIZB   1024 /* should hit tty line limit first :-) */
 
#define INUUBUFN   (45*100)
 
#define OUTUUBUF   (65*100)
 
#define ccc2l(c, l)
 
#define l2ccc(l, c)
 

Functions

void usage (void)
 
void doencryption (void)
 
int uufwrite (unsigned char *data, int size, unsigned int num, FILE *fp)
 
void uufwriteEnd (FILE *fp)
 
int uufread (unsigned char *out, int size, unsigned int num, FILE *fp)
 
int uuencode (unsigned char *in, int num, unsigned char *out)
 
int uudecode (unsigned char *in, int num, unsigned char *out)
 
void DES_3cbc_encrypt (DES_cblock *input, DES_cblock *output, long length, DES_key_schedule sk1, DES_key_schedule sk2, DES_cblock *ivec1, DES_cblock *ivec2, int enc)
 
int main (int argc, char **argv)
 

Variables

char key [KEYSIZB+1]
 
int do_encrypt
 
int longk =0
 
FILE * DES_IN
 
FILE * DES_OUT
 
FILE * CKSUM_OUT
 
char uuname [200]
 
unsigned char uubuf [50]
 
int uubufnum =0
 
unsigned char b [OUTUUBUF]
 
unsigned char bb [300]
 
DES_cblock cksum ={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
 
char cksumname [200] =""
 
int vflag
 
int cflag
 
int eflag
 
int dflag
 
int kflag
 
int bflag
 
int fflag
 
int sflag
 
int uflag
 
int flag3
 
int hflag
 
int error
 

Macro Definition Documentation

#define BUFSIZE   (8*1024)

Definition at line 109 of file des.c.

#define ccc2l (   c,
 
)
Value:
(l =((DES_LONG)(*((c)++)))<<16, \
l|=((DES_LONG)(*((c)++)))<< 8, \
l|=((DES_LONG)(*((c)++))))

Definition at line 818 of file des.c.

#define EXIT (   a)    exit(a)

Definition at line 106 of file des.c.

#define INUUBUFN   (45*100)

Definition at line 119 of file des.c.

#define KEYSIZ   8

Definition at line 111 of file des.c.

#define KEYSIZB   1024 /* should hit tty line limit first :-) */

Definition at line 112 of file des.c.

#define l2ccc (   l,
  c 
)
Value:
(*((c)++)=(unsigned char)(((l)>>16)&0xff), \
*((c)++)=(unsigned char)(((l)>> 8)&0xff), \
*((c)++)=(unsigned char)(((l) )&0xff))

Definition at line 822 of file des.c.

#define OUTUUBUF   (65*100)

Definition at line 120 of file des.c.

#define VERIFY   1

Definition at line 110 of file des.c.

Function Documentation

void DES_3cbc_encrypt ( DES_cblock input,
DES_cblock output,
long  length,
DES_key_schedule  sk1,
DES_key_schedule  sk2,
DES_cblock ivec1,
DES_cblock ivec2,
int  enc 
)

Definition at line 62 of file cbc3_enc.c.

void doencryption ( void  )

Definition at line 360 of file des.c.

int main ( int  argc,
char **  argv 
)

Definition at line 128 of file des.c.

void usage ( void  )
int uudecode ( unsigned char *  in,
int  num,
unsigned char *  out 
)

Definition at line 857 of file des.c.

int uuencode ( unsigned char *  in,
int  num,
unsigned char *  out 
)

Definition at line 827 of file des.c.

int uufread ( unsigned char *  out,
int  size,
unsigned int  num,
FILE *  fp 
)

Definition at line 755 of file des.c.

int uufwrite ( unsigned char *  data,
int  size,
unsigned int  num,
FILE *  fp 
)

Definition at line 685 of file des.c.

void uufwriteEnd ( FILE *  fp)

Definition at line 738 of file des.c.

Variable Documentation

unsigned char b[OUTUUBUF]

Definition at line 121 of file des.c.

unsigned char bb[300]

Definition at line 122 of file des.c.

int bflag

Definition at line 126 of file des.c.

int cflag

Definition at line 126 of file des.c.

DES_cblock cksum ={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}

Definition at line 123 of file des.c.

FILE * CKSUM_OUT

Definition at line 115 of file des.c.

char cksumname[200] =""

Definition at line 124 of file des.c.

FILE* DES_IN

Definition at line 115 of file des.c.

FILE * DES_OUT

Definition at line 115 of file des.c.

int dflag

Definition at line 126 of file des.c.

int do_encrypt

Definition at line 114 of file des.c.

int eflag

Definition at line 126 of file des.c.

int error

Definition at line 126 of file des.c.

int fflag

Definition at line 126 of file des.c.

int flag3

Definition at line 126 of file des.c.

int hflag

Definition at line 126 of file des.c.

char key[KEYSIZB+1]

Definition at line 113 of file des.c.

int kflag

Definition at line 126 of file des.c.

int longk =0

Definition at line 114 of file des.c.

int sflag

Definition at line 126 of file des.c.

int uflag

Definition at line 126 of file des.c.

unsigned char uubuf[50]

Definition at line 117 of file des.c.

int uubufnum =0

Definition at line 118 of file des.c.

char uuname[200]

Definition at line 116 of file des.c.

int vflag

Definition at line 126 of file des.c.