"Fossies" - the Fresh Open Source Software Archive

Member "libgcgi.a-0.9.5/src/crypt.h" (22 Jun 2002, 1512 Bytes) of package /linux/www/old/gcgi-0.9.5.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. For more information about "crypt.h" see the Fossies "Dox" file reference documentation.

    1 /* -*-mode:c; c-style:k&r; c-basic-offset:4; -*- */
    2 /*
    3  * GCGILibrary, implementing NCSA'a Common Gateway Interface and RFC2338.
    4  * Copyright (C) 2001-2002 Julian Catchen, julian@catchen.org
    5  *
    6  * This library is free software; you can redistribute it and/or
    7  * modify it under the terms of the GNU General Public
    8  * License as published by the Free Software Foundation; either
    9  * version 2 of the License, or (at your option) any later version.
   10  *
   11  * This library is distributed in the hope that it will be useful,
   12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   14  * Lesser General Public License for more details.
   15  *
   16  * You should have received a copy of the GNU General Public
   17  * License along with this library; if not, write to the Free Software
   18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   19  */
   20 
   21 #ifndef __CRYPT_H__
   22 #define __CRYPT_H__
   23 
   24 unsigned char *generateKey();
   25 void           encryptString(char *text, int size, unsigned char *key, char **ciphertext, int *ctlen);
   26 void           decryptString(char *ciphertext, int ctlen, unsigned char *key, char **text, int *size);
   27 void           generateStringHMAC(char *text, int size, unsigned char **hmac, int *hlen);
   28 int            writeKeyToFile(unsigned char *key, char *path);
   29 int            readKeyFromFile(char *path, unsigned char **key);
   30 void           printHexString(FILE *output, unsigned char *s, int len);
   31 
   32 #endif /* __CRYPT_H__ */