Back to index

php5  5.3.10
crypt_freesec.h
Go to the documentation of this file.
00001 /* $Id: crypt_freesec.h 265472 2008-08-25 14:37:07Z pajoye $ */
00002 
00003 #ifndef _CRYPT_FREESEC_H
00004 #define _CRYPT_FREESEC_H
00005 
00006 #if PHP_WIN32
00007 # include "win32/php_stdint.h"
00008 # ifndef inline
00009 # define inline __inline
00010 # endif
00011 #else
00012 # include "php_config.h"
00013 # if HAVE_INTTYPES_H
00014 #  include <inttypes.h>
00015 # elif HAVE_STDINT_H
00016 #  include <stdint.h>
00017 # endif
00018 # ifndef HAVE_UINT32_T
00019 #  if SIZEOF_INT == 4
00020 typedef unsigned int uint32_t;
00021 #  elif SIZEOF_LONG == 4
00022 typedef unsigned long int uint32_t;
00023 #  endif
00024 # endif
00025 #endif
00026 
00027 #define MD5_HASH_MAX_LEN 120
00028 
00029 struct php_crypt_extended_data {
00030        int initialized;
00031        uint32_t saltbits;
00032        uint32_t old_salt;
00033        uint32_t en_keysl[16], en_keysr[16];
00034        uint32_t de_keysl[16], de_keysr[16];
00035        uint32_t old_rawkey0, old_rawkey1;
00036        char output[21];
00037 };
00038 
00039 /*
00040  * _crypt_extended_init() must be called explicitly before first use of
00041  * _crypt_extended_r().
00042  */
00043 
00044 void _crypt_extended_init(void);
00045 
00046 char *_crypt_extended_r(const char *key, const char *setting,
00047        struct php_crypt_extended_data *data);
00048 
00049 #endif