[PHP4BETA] CVS update: php4/functions

From: Date: Wed, 21 Apr 1999 17:57:40 +0000
Subject: [PHP4BETA] CVS update: php4/functions
Groups: php.version4 
Request: Send a blank email to php-version4+get-238@lists.php.net to get a copy of this message
Date: Wednesday April 21, 1999 @ 13:57 Author: sas Update of /repository/php4/functions In directory php:/tmp/cvs-serv31610/functions Modified Files: crypt.c Log Message: crypt constants Index: php4/functions/crypt.c diff -c php4/functions/crypt.c:1.2 php4/functions/crypt.c:1.3 *** php4/functions/crypt.c:1.2 Sun Apr 18 14:06:54 1999 --- php4/functions/crypt.c Wed Apr 21 13:57:40 1999 *************** *** 28,34 **** | Rasmus Lerdorf <rasmus@lerdorf.on.ca> | +----------------------------------------------------------------------+ */ ! /* $Id: crypt.c,v 1.2 1999/04/18 18:06:54 zeev Exp $ */ #include <stdlib.h> #include "php.h" --- 28,34 ---- | Rasmus Lerdorf <rasmus@lerdorf.on.ca> | +----------------------------------------------------------------------+ */ ! /* $Id: crypt.c,v 1.3 1999/04/21 17:57:40 sas Exp $ */ #include <stdlib.h> #include "php.h" *************** *** 57,63 **** extern char *crypt(char *__key,char *__salt); #endif ! #include "ext/standard/php3_string.h" function_entry crypt_functions[] = { {"crypt", php3_crypt, NULL}, --- 57,63 ---- extern char *crypt(char *__key,char *__salt); #endif ! #include "functions/php3_crypt.h" function_entry crypt_functions[] = { {"crypt", php3_crypt, NULL}, *************** *** 65,71 **** }; php3_module_entry crypt_module_entry = { ! "Crypt", crypt_functions, NULL, NULL, NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES }; --- 65,71 ---- }; php3_module_entry crypt_module_entry = { ! "Crypt", crypt_functions, php_minit_crypt, NULL, NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES }; *************** *** 100,105 **** --- 100,120 ---- #define PHP3_CRYPT_RAND rand() #endif #endif + + int php_minit_crypt(INIT_FUNC_ARGS) { + #ifdef PHP3_STD_DES_CRYPT + REGISTER_LONG_CONSTANT("CRYPT_SALT_LENGTH", 2, CONST_CS | CONST_PERSISTENT); + #else + #if PHP3_MD5_CRYPT + REGISTER_LONG_CONSTANT("CRYPT_SALT_LENGTH", 12, CONST_CS | CONST_PERSISTENT); + #endif + #endif + REGISTER_LONG_CONSTANT("CRYPT_STD_DES", PHP3_STD_DES_CRYPT, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("CRYPT_EXT_DES", PHP3_EXT_DES_CRYPT, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("CRYPT_MD5", PHP3_MD5_CRYPT, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("CRYPT_BLOWFISH", PHP3_BLOWFISH_CRYPT, CONST_CS | CONST_PERSISTENT); + return SUCCESS; + } static unsigned char itoa64[] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; -- PHP 4 Beta

« previous php.version4 (#238) next »