"Fossies" - the Fresh Open Source Software Archive

Member "apg-2.2.3/cast/cast.h" (7 Aug 2003, 602 Bytes) of package /linux/privat/old/apg-2.2.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /*
    2  *  CAST-128 in C
    3  *  Written by Steve Reid <sreid@sea-to-sky.net>
    4  *  100% Public Domain - no warranty
    5  *  Released 1997.10.11
    6  */
    7 
    8 #ifndef _CAST_H_
    9 #define _CAST_H_
   10 
   11 typedef unsigned char u8;   /* 8-bit unsigned */
   12 typedef unsigned long u32;  /* 32-bit unsigned */
   13 
   14 typedef struct {
   15     u32 xkey[32];   /* Key, after expansion */
   16     int rounds;     /* Number of rounds to use, 12 or 16 */
   17 } cast_key;
   18 
   19 void cast_setkey(cast_key* key, u8* rawkey, int keybytes);
   20 void cast_encrypt(cast_key* key, u8* inblock, u8* outblock);
   21 void cast_decrypt(cast_key* key, u8* inblock, u8* outblock);
   22 
   23 #endif /* ifndef _CAST_H_ */
   24