[BACK]Return to des_rw.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / rlogin

Diff for /src/usr.bin/rlogin/Attic/des_rw.c between version 1.4 and 1.5

version 1.4, 1996/06/26 05:38:30 version 1.5, 1996/11/11 05:59:44
Line 54 
Line 54 
 #include <unistd.h>  #include <unistd.h>
   
 static unsigned char    des_inbuf[10240], storage[10240], *store_ptr;  static unsigned char    des_inbuf[10240], storage[10240], *store_ptr;
 static bit_64           *key;  static des_cblock       *key;
 static u_char           *key_schedule;  static des_key_schedule *key_schedule;
   
 /*  /*
  * NB: These routines will not function properly if NBIO   * NB: These routines will not function properly if NBIO
Line 75 
Line 75 
   
 void  void
 desrw_set_key(inkey, insched)  desrw_set_key(inkey, insched)
         bit_64          *inkey;          des_cblock      *inkey;
         u_char          *insched;          des_key_schedule*insched;
 {  {
         key = inkey;          key = inkey;
         key_schedule = insched;          key_schedule = insched;
Line 135 
Line 135 
         (void) des_pcbc_encrypt((des_cblock *)des_inbuf,        /* inbuf */          (void) des_pcbc_encrypt((des_cblock *)des_inbuf,        /* inbuf */
                             (des_cblock *)storage,              /* outbuf */                              (des_cblock *)storage,              /* outbuf */
                             rd_len,                             /* length */                              rd_len,                             /* length */
                             key_schedule,                       /* DES key */                              *key_schedule,                      /* DES key */
                             (des_cblock *)key,                  /* IV */                              key,                                /* IV */
                             DECRYPT);                           /* direction */                              DECRYPT);                           /* direction */
   
         if(net_len < 8)          if(net_len < 8)
Line 187 
Line 187 
         (void) des_pcbc_encrypt((des_cblock *)((len < 8) ? garbage_buf : buf),          (void) des_pcbc_encrypt((des_cblock *)((len < 8) ? garbage_buf : buf),
                             (des_cblock *)des_outbuf,                              (des_cblock *)des_outbuf,
                             (len < 8) ? 8 : len,                              (len < 8) ? 8 : len,
                             key_schedule,               /* DES key */                              *key_schedule,              /* DES key */
                             (des_cblock *)key,          /* IV */                              key,                        /* IV */
                             ENCRYPT);                              ENCRYPT);
   
         /* tell the other end the real amount, but send an 8-byte padded          /* tell the other end the real amount, but send an 8-byte padded

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5