1 /* ==================================================================== 2 * Copyright (c) 2002 Johnny Shelley. All rights reserved. 3 * 4 * Bcrypt is licensed under the BSD software license. See the file 5 * called 'LICENSE' that you should have received with this software 6 * for details 7 * ==================================================================== 8 */ 9 10 #include "includes.h" 11 #include "blowfish.h" 12 13 /* from wrapbf.c */ 14 uLong BFEncrypt(char **input, char *key, uLong sz, 15 BCoptions *options); 16 uLong BFDecrypt(char **input, char *key, char *key2, 17 uLong sz, BCoptions *options); 18 19 /* from keys.c */ 20 char * getkey(int type); 21 void mutateKey(char **key, char **key2); 22 23 /* from rwfile.c */ 24 int getremain(uLong sz, int dv); 25 uLong padInput(char **input, uLong sz); 26 uLong attachKey(char **input, char *key, uLong sz); 27 uLong readfile(char *infile, char **input, int type, char *key, 28 struct stat statbuf); 29 uLong writefile(char *outfile, char *output, uLong sz, 30 BCoptions options, struct stat statbuf); 31 int deletefile(char *file, BCoptions options, char *key, struct stat statbuf); 32 33 /* from wrapzl.c */ 34 uLong docompress(char **input, uLong sz); 35 uLong douncompress(char **input, uLong sz, BCoptions options); 36 37 /* from main.c */ 38 BCoptions initoptions(BCoptions options); 39 int usage(char *name); 40 int memerror(); 41 int parseArgs(int *argc, char **argv, BCoptions *options); 42 int assignFiles(char *arg, char **infile, char **outfile, struct stat *statbuf, 43 BCoptions *options, char *key); 44 int main(int argc, char *argv[]); 45 46 /* from endian.c */ 47 void getEndian(unsigned char **e); 48 uInt32 swapEndian(uInt32 value); 49 int testEndian(char *input); 50 int swapCompressed(char **input, uLong sz); 51 52