// DES Encyption Library // Scott Dial // Copyright 2004 #ifndef __DES_H__ #define __DES_H__ // Standard DES Modes #define DES_ENCRYPT 0 #define DES_DECRYPT 1 #define DES_ECB 0 #define DES_CBC 1 #define DES_CFB 2 #define DES_OFB 3 #define DES_CTR 4 // DES encrypt/decrypt a single block void des_block(char *oblock, const char *block, const char *key, int action); // DES encrypt/decrypt a stream (Padded Input) // To pass IV, append to the key void des(char *out, const char *in, size_t len, const char *key, int action, int mode); #endif __DES_H__