/* * Copyright (C) (2004) (Mario Juric) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef seekcrypt_h #define seekcrypt_h /************************************************/ typedef struct ENCFILE_t ENCFILE; ENCFILE *enc_fopen(const char *filename, const char *rwmode, const char *passphrase); int enc_fread(void *out, int size, int count, ENCFILE *ef); int enc_fwrite(void *data, int size, int count, ENCFILE *ef); int enc_fseek(ENCFILE *ef, long at, int dir); int enc_ftell(ENCFILE *ef); void enc_fflush(ENCFILE *ef); int enc_feof(ENCFILE *ef); int enc_fclose(ENCFILE *ef); void enc_info(ENCFILE *ef); /************************************************/ /* index_mode flags */ #define INDEX_CREATE 0x01 #define INDEX_LOAD 0x02 #define INDEX_SAVE 0x04 int enc_add_index(ENCFILE *ef, const char *indexfile, const char *passphrase, int index_mode); #endif