diff options
Diffstat (limited to 'src/lib/libcrypto/des/enc_writ.c')
-rw-r--r-- | src/lib/libcrypto/des/enc_writ.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libcrypto/des/enc_writ.c b/src/lib/libcrypto/des/enc_writ.c index cc2b50fb50..af5b8c2349 100644 --- a/src/lib/libcrypto/des/enc_writ.c +++ b/src/lib/libcrypto/des/enc_writ.c | |||
@@ -66,9 +66,9 @@ | |||
66 | /* | 66 | /* |
67 | * WARNINGS: | 67 | * WARNINGS: |
68 | * | 68 | * |
69 | * - The data format used by des_enc_write() and des_enc_read() | 69 | * - The data format used by DES_enc_write() and DES_enc_read() |
70 | * has a cryptographic weakness: When asked to write more | 70 | * has a cryptographic weakness: When asked to write more |
71 | * than MAXWRITE bytes, des_enc_write will split the data | 71 | * than MAXWRITE bytes, DES_enc_write will split the data |
72 | * into several chunks that are all encrypted | 72 | * into several chunks that are all encrypted |
73 | * using the same IV. So don't use these functions unless you | 73 | * using the same IV. So don't use these functions unless you |
74 | * are sure you know what you do (in which case you might | 74 | * are sure you know what you do (in which case you might |
@@ -77,8 +77,8 @@ | |||
77 | * - This code cannot handle non-blocking sockets. | 77 | * - This code cannot handle non-blocking sockets. |
78 | */ | 78 | */ |
79 | 79 | ||
80 | int des_enc_write(int fd, const void *_buf, int len, | 80 | int DES_enc_write(int fd, const void *_buf, int len, |
81 | des_key_schedule sched, des_cblock *iv) | 81 | DES_key_schedule *sched, DES_cblock *iv) |
82 | { | 82 | { |
83 | #ifdef _LIBC | 83 | #ifdef _LIBC |
84 | extern unsigned long time(); | 84 | extern unsigned long time(); |
@@ -111,7 +111,7 @@ int des_enc_write(int fd, const void *_buf, int len, | |||
111 | j=0; | 111 | j=0; |
112 | for (i=0; i<len; i+=k) | 112 | for (i=0; i<len; i+=k) |
113 | { | 113 | { |
114 | k=des_enc_write(fd,&(buf[i]), | 114 | k=DES_enc_write(fd,&(buf[i]), |
115 | ((len-i) > MAXWRITE)?MAXWRITE:(len-i),sched,iv); | 115 | ((len-i) > MAXWRITE)?MAXWRITE:(len-i),sched,iv); |
116 | if (k < 0) | 116 | if (k < 0) |
117 | return(k); | 117 | return(k); |
@@ -139,11 +139,11 @@ int des_enc_write(int fd, const void *_buf, int len, | |||
139 | rnum=((len+7)/8*8); /* round up to nearest eight */ | 139 | rnum=((len+7)/8*8); /* round up to nearest eight */ |
140 | } | 140 | } |
141 | 141 | ||
142 | if (des_rw_mode & DES_PCBC_MODE) | 142 | if (DES_rw_mode & DES_PCBC_MODE) |
143 | des_pcbc_encrypt(cp,&(outbuf[HDRSIZE]),(len<8)?8:len,sched,iv, | 143 | DES_pcbc_encrypt(cp,&(outbuf[HDRSIZE]),(len<8)?8:len,sched,iv, |
144 | DES_ENCRYPT); | 144 | DES_ENCRYPT); |
145 | else | 145 | else |
146 | des_cbc_encrypt(cp,&(outbuf[HDRSIZE]),(len<8)?8:len,sched,iv, | 146 | DES_cbc_encrypt(cp,&(outbuf[HDRSIZE]),(len<8)?8:len,sched,iv, |
147 | DES_ENCRYPT); | 147 | DES_ENCRYPT); |
148 | 148 | ||
149 | /* output */ | 149 | /* output */ |