CVS update: php3/functions
| From: | sas | Date: | Sat, 01 May 1999 11:12:34 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-5312@lists.php.net to get a copy of this message | ||
Date: Saturday May 1, 1999 @ 7:12
Author: sas
Update of /repository/php3/functions
In directory php:/tmp/cvs-serv22225/functions
Modified Files:
mcrypt.c php_mcrypt.h
Log Message:
mcrypt 2.1.18 support, better autoconf checking
Index: php3/functions/mcrypt.c
diff -u php3/functions/mcrypt.c:1.1 php3/functions/mcrypt.c:1.2
--- php3/functions/mcrypt.c:1.1 Sun Apr 25 18:24:11 1999
+++ php3/functions/mcrypt.c Sat May 1 07:12:34 1999
@@ -31,17 +31,12 @@
#if HAVE_LIBMCRYPT
-#if PHP_API_VERSION < 19990421
-#define zend_module_entry php3_module_entry
-#include "modules.h"
-#include "internal_functions.h"
-#endif
-
-#include "fcntl.h"
-
#include "php_mcrypt.h"
+#include "fcntl.h"
-#include "lcrypt.h"
+/* we should find a way to figure out whether RC6/IDEA are available */
+#define NON_FREE
+#include "mcrypt.h"
function_entry mcrypt_functions[] = {
PHP_FE(mcrypt_ecb, NULL)
@@ -143,15 +138,29 @@
MCRYPT_ENTRY(TripleDES);
MCRYPT_ENTRY(ThreeWAY);
MCRYPT_ENTRY(GOST);
+#ifdef MCRYPT2
+ MCRYPT_ENTRY(CRYPT);
+ MCRYPT_ENTRY(DES_COMPAT);
+#endif
MCRYPT_ENTRY(SAFER64);
MCRYPT_ENTRY(SAFER128);
MCRYPT_ENTRY(CAST128);
MCRYPT_ENTRY(TEAN);
- MCRYPT_ENTRY(TWOFISH);
MCRYPT_ENTRY(RC2);
-#ifdef CRYPT
- MCRYPT_ENTRY(CRYPT);
+#ifdef TWOFISH
+ MCRYPT_ENTRY(TWOFISH);
+#elif defined(TWOFISH128)
+ MCRYPT_ENTRY(TWOFISH128);
+ MCRYPT_ENTRY(TWOFISH192);
+ MCRYPT_ENTRY(TWOFISH256);
+#endif
+#ifdef RC6
+ MCRYPT_ENTRY(RC6);
+#endif
+#ifdef IDEA
+ MCRYPT_ENTRY(IDEA);
#endif
+
return SUCCESS;
}
@@ -179,6 +188,11 @@
source = psource->value.lval;
i = size->value.lval;
+ if(i <= 0) {
+ php3_error(E_WARNING, "illegal size input parameter");
+ RETURN_FALSE;
+ }
+
iv = ecalloc(i, 1);
if(source == RANDOM || source == URANDOM) {
Index: php3/functions/php_mcrypt.h
diff -u php3/functions/php_mcrypt.h:1.1 php3/functions/php_mcrypt.h:1.2
--- php3/functions/php_mcrypt.h:1.1 Sun Apr 25 18:24:11 1999
+++ php3/functions/php_mcrypt.h Sat May 1 07:12:34 1999
@@ -3,6 +3,12 @@
#if HAVE_LIBMCRYPT
+#if PHP_API_VERSION < 19990421
+#define zend_module_entry php3_module_entry
+#include "modules.h"
+#include "internal_functions.h"
+#endif
+
extern zend_module_entry mcrypt_module_entry;
#define mcrypt_module_ptr &mcrypt_module_entry
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net