int des_enc_read(fd,buf,len,ks,iv)
int fd, len;
char *buf;
des_key_schedule ks;
des_cblock *iv;
int des_enc_write(fd,buf,len,ks,iv)
int fd, len;
char *buf;
des_key_schedule ks;
des_cblock *iv;
des_rw_mode This flag holds either DES_CBC_MODE or DES_PCBC_MODE (default). This specifies the function to use in the enc_read() and enc_write() functions.
des_enc_read() will write to a file descriptor the encrypted data from buf. This data will be preceded by a 4 byte 'byte count' and will be padded out to 8 bytes. The encryption is either CBC of PCBC depending on the value of des_rw_mode. If it is DES_PCBC_MODE, pcbc is used, if DES_CBC_MODE, cbc is used. The default is to use DES_PCBC_MODE.
des_enc_write() reads stuff written by des_enc_read() and decrypts it. I have used these routines quite a lot but I don't believe they are suitable for non-blocking io. If you are after a full authentication/encryption over networks, have a look at SSL instead.