[BACK]Return to block.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / ox_ntl / crypt / des

Diff for /OpenXM/src/ox_ntl/crypt/des/block.c between version 1.1 and 1.2

version 1.1, 2004/07/11 00:32:17 version 1.2, 2005/06/19 15:45:38
Line 1 
Line 1 
 /* $OpenXM$ */  /* $OpenXM: OpenXM/src/ox_ntl/crypt/des/block.c,v 1.1 2004/07/11 00:32:17 iwane Exp $ */
   
 #include <stdlib.h>  #include <stdlib.h>
 #include <stdio.h>  #include <stdio.h>
Line 33  crypt_ecb(void *key, int block, int len,
Line 33  crypt_ecb(void *key, int block, int len,
   
   
 int  int
 crypt_enc_cbc(void *key, int block, const unsigned char *iv, int len,  crypt_enc_cbc(void *key, int block, unsigned char *iv, int len,
     const unsigned char *data, unsigned char *buf, void *func)      const unsigned char *data, unsigned char *buf, void *func)
 {  {
         int i, j, ret;          int i, j, ret;
Line 56  crypt_enc_cbc(void *key, int block, const unsigned cha
Line 56  crypt_enc_cbc(void *key, int block, const unsigned cha
                 ivp = buf + i;                  ivp = buf + i;
         }          }
   
           memcpy(iv, ivp, block);
   
         return (0);          return (0);
 }  }
   
   
 int  int
 crypt_dec_cbc(void *key, int block, const unsigned char *iv, int len,  crypt_dec_cbc(void *key, int block, unsigned char *iv, int len,
     const unsigned char *enc,      const unsigned char *enc,
     unsigned char *buf,      unsigned char *buf,
     void *func)      void *func)
Line 86  crypt_dec_cbc(void *key, int block, const unsigned cha
Line 88  crypt_dec_cbc(void *key, int block, const unsigned cha
                 }                  }
                 ivp = enc + i;                  ivp = enc + i;
         }          }
   
           memcpy(iv, ivp, block);
   
         return (0);          return (0);
 }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>