pollita Wed Sep 20 00:32:54 2006 UTC
Modified files:
/php-src/ext/hash hash.c
/php-src/ext/hash/tests adler32.phpt crc32.phpt gost.phpt
haval.phpt hmac-md5.phpt md2.phpt md4.phpt
md5.phpt ripemd128.phpt ripemd160.phpt
sha1.phpt sha256.phpt sha384.phpt
sha512.phpt snefru.phpt tiger.phpt
whirlpool.phpt
Log:
PHP6 Updates
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/hash.c?r1=1.29&r2=1.30&diff_format=u
Index: php-src/ext/hash/hash.c
diff -u php-src/ext/hash/hash.c:1.29 php-src/ext/hash/hash.c:1.30
--- php-src/ext/hash/hash.c:1.29 Tue Sep 19 23:42:49 2006
+++ php-src/ext/hash/hash.c Wed Sep 20 00:32:54 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hash.c,v 1.29 2006/09/19 23:42:49 pollita Exp $ */
+/* $Id: hash.c,v 1.30 2006/09/20 00:32:54 pollita Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -67,22 +67,49 @@
{
char *algo, *data, *digest;
int algo_len, data_len;
+ zend_uchar data_type = IS_STRING;
zend_bool raw_output = 0;
php_hash_ops *ops;
void *context;
php_stream *stream = NULL;
+#if PHP_MAJOR_VERSION >= 6
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "st|b", &algo,
&algo_len, &data, &data_len, &data_type, &raw_output) == FAILURE) {
+ return;
+ }
+
+ if (data_type == IS_UNICODE) {
+ if (isfilename) {
+ if (php_stream_path_encode(NULL, &data, &data_len,
(UChar *)data, data_len, REPORT_ERRORS, FG(default_context)) == FAILURE) {
+ RETURN_FALSE;
+ }
+ } else {
+ /* Unicode string passed for raw hashing */
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unicode
strings can not be hashed. Convert to a binary type.");
+ RETURN_FALSE;
+ }
+ }
+#else
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|b", &algo,
&algo_len, &data, &data_len, &raw_output) == FAILURE) {
return;
}
+#endif
ops = php_hash_fetch_ops(algo, algo_len);
if (!ops) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown hashing
algorithm: %s", algo);
+ if (data_type != IS_STRING) {
+ /* Original filename was UNICODE, this string is a
converted copy */
+ efree(data);
+ }
RETURN_FALSE;
}
if (isfilename) {
stream = php_stream_open_wrapper_ex(data, "rb", REPORT_ERRORS,
NULL, DEFAULT_CONTEXT);
+ if (data_type != IS_STRING) {
+ /* Original filename was UNICODE, this string is a
converted copy */
+ efree(data);
+ }
if (!stream) {
/* Stream will report errors opening file */
RETURN_FALSE;
@@ -121,7 +148,7 @@
}
}
-/* {{{ proto string hash(string algo, string data[, bool raw_output = false])
+/* {{{ proto string hash(string algo, string data[, bool raw_output = false]) U
Generate a hash of a given input string
Returns lowercase hexits by default */
PHP_FUNCTION(hash) {
@@ -129,7 +156,7 @@
}
/* }}} */
-/* {{{ proto string hash_file(string algo, string filename[, bool raw_output =
false])
+/* {{{ proto string hash_file(string algo, string filename[, bool raw_output =
false]) U
Generate a hash of a given file
Returns lowercase hexits by default */
PHP_FUNCTION(hash_file) {
@@ -141,23 +168,49 @@
{
char *algo, *data, *digest, *key, *K;
int algo_len, data_len, key_len, i;
+ zend_uchar data_type = IS_STRING;
zend_bool raw_output = 0;
php_hash_ops *ops;
void *context;
php_stream *stream = NULL;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss|b", &algo,
&algo_len, &data, &data_len,
-
&key, &key_len, &raw_output)
== FAILURE) {
+#if PHP_MAJOR_VERSION >= 6
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "stS|b", &algo,
&algo_len, &data, &data_len, &data_type, &key, &key_len, &raw_output) ==
FAILURE) {
+ return;
+ }
+
+ if (data_type == IS_UNICODE) {
+ if (isfilename) {
+ if (php_stream_path_encode(NULL, &data, &data_len,
(UChar *)data, data_len, REPORT_ERRORS, FG(default_context)) == FAILURE) {
+ RETURN_FALSE;
+ }
+ } else {
+ /* Unicode string passed for raw hashing */
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unicode
strings can not be hashed. Convert to a binary type.");
+ RETURN_FALSE;
+ }
+ }
+#else
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss|b", &algo,
&algo_len, &data, &data_len, &key, &key_len, &raw_output) == FAILURE) {
return;
}
+#endif
ops = php_hash_fetch_ops(algo, algo_len);
if (!ops) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown hashing
algorithm: %s", algo);
+ if (data_type != IS_STRING) {
+ /* Original filename was UNICODE, this string is a
converted copy */
+ efree(data);
+ }
RETURN_FALSE;
}
if (isfilename) {
stream = php_stream_open_wrapper_ex(data, "rb", REPORT_ERRORS,
NULL, DEFAULT_CONTEXT);
+ if (data_type != IS_STRING) {
+ /* Original filename was UNICODE, this string is a
converted copy */
+ efree(data);
+ }
if (!stream) {
/* Stream will report errors opening file */
RETURN_FALSE;
@@ -230,7 +283,7 @@
}
}
-/* {{{ proto string hash_hmac(string algo, string data, string key[, bool
raw_output = false])
+/* {{{ proto string hash_hmac(string algo, string data, string key[, bool
raw_output = false]) U
Generate a hash of a given input string with a key using HMAC
Returns lowercase hexits by default */
PHP_FUNCTION(hash_hmac) {
@@ -238,7 +291,7 @@
}
/* }}} */
-/* {{{ proto string hash_hmac_file(string algo, string filename, string key[,
bool raw_output = false])
+/* {{{ proto string hash_hmac_file(string algo, string filename, string key[,
bool raw_output = false]) U
Generate a hash of a given file with a key using HMAC
Returns lowercase hexits by default */
PHP_FUNCTION(hash_hmac_file) {
@@ -247,7 +300,7 @@
/* }}} */
-/* {{{ proto resource hash_init(string algo[, int options, string key])
+/* {{{ proto resource hash_init(string algo[, int options, string key]) U
Initialize a hashing context */
PHP_FUNCTION(hash_init)
{
@@ -312,7 +365,13 @@
}
/* }}} */
-/* {{{ proto bool hash_update(resource context, string data)
+#if PHP_MAJOR_VERSION >= 6
+# define PHP_HASH_UPDATE_ARGS "rS"
+#else
+# define PHP_HASH_UPDATE_ARGS "rs"
+#endif
+
+/* {{{ proto bool hash_update(resource context, string data) U
Pump data into the hashing algorithm */
PHP_FUNCTION(hash_update)
{
@@ -321,7 +380,7 @@
char *data;
int data_len;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &zhash,
&data, &data_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
PHP_HASH_UPDATE_ARGS, &zhash, &data, &data_len) == FAILURE) {
return;
}
@@ -333,7 +392,7 @@
}
/* }}} */
-/* {{{ proto int hash_update_stream(resource context, resource handle[,
integer length])
+/* {{{ proto int hash_update_stream(resource context, resource handle[,
integer length]) U
Pump data into the hashing algorithm from an open stream */
PHP_FUNCTION(hash_update_stream)
{
@@ -370,7 +429,7 @@
}
/* }}} */
-/* {{{ proto bool hash_update_file(resource context, string filename[,
resource context])
+/* {{{ proto bool hash_update_file(resource context, string filename[,
resource context]) U
Pump data into the hashing algorithm from a file */
PHP_FUNCTION(hash_update_file)
{
@@ -380,15 +439,35 @@
php_stream *stream;
char *filename, buf[1024];
int filename_len, n;
+ zend_uchar filename_type = IS_STRING;
+
+#if PHP_MAJOR_VERSION >= 6
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rt|r", &zhash,
&filename, &filename_len, &filename_type, &zcontext) == FAILURE) {
+ return;
+ }
+
+ context = php_stream_context_from_zval(zcontext, 0);
+ if (filename_type == IS_UNICODE) {
+ if (php_stream_path_encode(NULL, &filename, &filename_len,
(UChar *)filename, filename_len, REPORT_ERRORS, context) == FAILURE) {
+ RETURN_FALSE;
+ }
+ }
+#else
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|r", &zhash,
&filename, &filename_len, &zcontext) == FAILURE) {
return;
}
- ZEND_FETCH_RESOURCE(hash, php_hash_data*, &zhash, -1, PHP_HASH_RESNAME,
php_hash_le_hash);
context = php_stream_context_from_zval(zcontext, 0);
+#endif
+
+ ZEND_FETCH_RESOURCE(hash, php_hash_data*, &zhash, -1, PHP_HASH_RESNAME,
php_hash_le_hash);
stream = php_stream_open_wrapper_ex(filename, "rb", REPORT_ERRORS,
NULL, context);
+ if (filename_type != IS_STRING) {
+ /* Original filename was UNICODE, this string is a converted
copy */
+ efree(filename);
+ }
if (!stream) {
/* Stream will report errors opening file */
RETURN_FALSE;
@@ -403,7 +482,7 @@
}
/* }}} */
-/* {{{ proto string hash_final(resource context[, bool raw_output=false])
+/* {{{ proto string hash_final(resource context[, bool raw_output=false]) U
Output resulting digest */
PHP_FUNCTION(hash_final)
{
@@ -467,7 +546,7 @@
}
/* }}} */
-/* {{{ proto array hash_algos(void)
+/* {{{ proto array hash_algos(void) U
Return a list of registered hashing algorithms */
PHP_FUNCTION(hash_algos)
{
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/adler32.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/hash/tests/adler32.phpt
diff -u php-src/ext/hash/tests/adler32.phpt:1.2
php-src/ext/hash/tests/adler32.phpt:1.3
--- php-src/ext/hash/tests/adler32.phpt:1.2 Sat Dec 3 10:32:42 2005
+++ php-src/ext/hash/tests/adler32.phpt Wed Sep 20 00:32:54 2006
@@ -1,7 +1,7 @@
--TEST--
ADLER32
--SKIPIF--
-<?php extension_loaded('hash') or die('skip'); ?>
+<?php if (!extension_loaded('hash') || ini_get('unicode.semantics'))
die('skip'); ?>
--FILE--
<?php
echo hash('adler32', ''), "\n";
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/crc32.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/hash/tests/crc32.phpt
diff -u php-src/ext/hash/tests/crc32.phpt:1.1
php-src/ext/hash/tests/crc32.phpt:1.2
--- php-src/ext/hash/tests/crc32.phpt:1.1 Sat Dec 3 10:16:59 2005
+++ php-src/ext/hash/tests/crc32.phpt Wed Sep 20 00:32:54 2006
@@ -1,7 +1,7 @@
--TEST--
CRC32
--SKIPIF--
-<?php extension_loaded('hash') or die('skip'); ?>
+<?php if (!extension_loaded('hash') || ini_get('unicode.semantics'))
die('skip'); ?>
--FILE--
<?php
echo hash('crc32', ''), "\n";
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/gost.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/hash/tests/gost.phpt
diff -u php-src/ext/hash/tests/gost.phpt:1.1
php-src/ext/hash/tests/gost.phpt:1.2
--- php-src/ext/hash/tests/gost.phpt:1.1 Fri Nov 25 18:24:34 2005
+++ php-src/ext/hash/tests/gost.phpt Wed Sep 20 00:32:54 2006
@@ -1,7 +1,7 @@
--TEST--
gost
--SKIPIF--
-<?php extension_loaded('hash') or die('skip'); ?>
+<?php if (!extension_loaded('hash') || ini_get('unicode.semantics'))
die('skip'); ?>
--FILE--
<?php
echo hash('gost', ''), "\n";
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/haval.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/hash/tests/haval.phpt
diff -u php-src/ext/hash/tests/haval.phpt:1.2
php-src/ext/hash/tests/haval.phpt:1.3
--- php-src/ext/hash/tests/haval.phpt:1.2 Wed Nov 23 00:30:08 2005
+++ php-src/ext/hash/tests/haval.phpt Wed Sep 20 00:32:54 2006
@@ -1,7 +1,7 @@
--TEST--
haval algorithm (multi-vector, multi-pass, multi-width)
--SKIPIF--
-<?php if(!extension_loaded("hash")) print "skip"; ?>
+<?php if(!extension_loaded("hash") || ini_get('unicode.semantics')) print
"skip"; ?>
--FILE--
<?php
echo "Empty String\n";
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/hmac-md5.phpt?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/hash/tests/hmac-md5.phpt
diff -u php-src/ext/hash/tests/hmac-md5.phpt:1.3
php-src/ext/hash/tests/hmac-md5.phpt:1.4
--- php-src/ext/hash/tests/hmac-md5.phpt:1.3 Thu Dec 1 04:53:55 2005
+++ php-src/ext/hash/tests/hmac-md5.phpt Wed Sep 20 00:32:54 2006
@@ -1,7 +1,7 @@
--TEST--
hmac-md5 algorithm
--SKIPIF--
-<?php if(!extension_loaded("hash")) print "skip"; ?>
+<?php if(!extension_loaded("hash") || ini_get('unicode.semantics')) print
"skip"; ?>
--FILE--
<?php
/* Test Vectors from RFC 2104 */
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/md2.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/hash/tests/md2.phpt
diff -u php-src/ext/hash/tests/md2.phpt:1.1 php-src/ext/hash/tests/md2.phpt:1.2
--- php-src/ext/hash/tests/md2.phpt:1.1 Tue Feb 21 20:37:12 2006
+++ php-src/ext/hash/tests/md2.phpt Wed Sep 20 00:32:54 2006
@@ -1,7 +1,7 @@
--TEST--
md2 algorithm
--SKIPIF--
-<?php if(!extension_loaded("hash")) print "skip"; ?>
+<?php if(!extension_loaded("hash") || ini_get('unicode.semantics')) print
"skip"; ?>
--FILE--
<?php
echo hash('md2', '') . "\n";
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/md4.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/hash/tests/md4.phpt
diff -u php-src/ext/hash/tests/md4.phpt:1.1 php-src/ext/hash/tests/md4.phpt:1.2
--- php-src/ext/hash/tests/md4.phpt:1.1 Sat Dec 3 00:51:30 2005
+++ php-src/ext/hash/tests/md4.phpt Wed Sep 20 00:32:54 2006
@@ -1,7 +1,7 @@
--TEST--
md4 algorithm
--SKIPIF--
-<?php if(!extension_loaded("hash")) print "skip"; ?>
+<?php if(!extension_loaded("hash") || ini_get('unicode.semantics')) print
"skip"; ?>
--FILE--
<?php
/* RFC 1320 vectors */
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/md5.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/hash/tests/md5.phpt
diff -u php-src/ext/hash/tests/md5.phpt:1.2 php-src/ext/hash/tests/md5.phpt:1.3
--- php-src/ext/hash/tests/md5.phpt:1.2 Wed Nov 23 00:30:08 2005
+++ php-src/ext/hash/tests/md5.phpt Wed Sep 20 00:32:54 2006
@@ -1,7 +1,7 @@
--TEST--
md5 algorithm
--SKIPIF--
-<?php if(!extension_loaded("hash")) print "skip"; ?>
+<?php if(!extension_loaded("hash") || ini_get('unicode.semantics')) print
"skip"; ?>
--FILE--
<?php
echo hash('md5', '') . "\n";
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/ripemd128.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/hash/tests/ripemd128.phpt
diff -u php-src/ext/hash/tests/ripemd128.phpt:1.2
php-src/ext/hash/tests/ripemd128.phpt:1.3
--- php-src/ext/hash/tests/ripemd128.phpt:1.2 Wed Nov 23 00:30:08 2005
+++ php-src/ext/hash/tests/ripemd128.phpt Wed Sep 20 00:32:54 2006
@@ -1,7 +1,7 @@
--TEST--
ripemd128 algorithm
--SKIPIF--
-<?php if(!extension_loaded("hash")) print "skip"; ?>
+<?php if(!extension_loaded("hash") || ini_get('unicode.semantics')) print
"skip"; ?>
--FILE--
<?php
echo hash('ripemd128', '') . "\n";
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/ripemd160.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/hash/tests/ripemd160.phpt
diff -u php-src/ext/hash/tests/ripemd160.phpt:1.2
php-src/ext/hash/tests/ripemd160.phpt:1.3
--- php-src/ext/hash/tests/ripemd160.phpt:1.2 Wed Nov 23 00:30:08 2005
+++ php-src/ext/hash/tests/ripemd160.phpt Wed Sep 20 00:32:54 2006
@@ -1,7 +1,7 @@
--TEST--
ripemd160 algorithm
--SKIPIF--
-<?php if(!extension_loaded("hash")) print "skip"; ?>
+<?php if(!extension_loaded("hash") || ini_get('unicode.semantics')) print
"skip"; ?>
--FILE--
<?php
echo hash('ripemd160', '') . "\n";
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/sha1.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/hash/tests/sha1.phpt
diff -u php-src/ext/hash/tests/sha1.phpt:1.2
php-src/ext/hash/tests/sha1.phpt:1.3
--- php-src/ext/hash/tests/sha1.phpt:1.2 Wed Nov 23 00:30:08 2005
+++ php-src/ext/hash/tests/sha1.phpt Wed Sep 20 00:32:54 2006
@@ -1,7 +1,7 @@
--TEST--
sha1 algorithm
--SKIPIF--
-<?php if(!extension_loaded("hash")) print "skip"; ?>
+<?php if(!extension_loaded("hash") || ini_get('unicode.semantics')) print
"skip"; ?>
--FILE--
<?php
echo hash('sha1', '') . "\n";
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/sha256.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/hash/tests/sha256.phpt
diff -u php-src/ext/hash/tests/sha256.phpt:1.2
php-src/ext/hash/tests/sha256.phpt:1.3
--- php-src/ext/hash/tests/sha256.phpt:1.2 Wed Nov 23 00:30:08 2005
+++ php-src/ext/hash/tests/sha256.phpt Wed Sep 20 00:32:54 2006
@@ -1,7 +1,7 @@
--TEST--
sha256 algorithm
--SKIPIF--
-<?php if(!extension_loaded("hash")) print "skip"; ?>
+<?php if(!extension_loaded("hash") || ini_get('unicode.semantics')) print
"skip"; ?>
--FILE--
<?php
echo hash('sha256', '') . "\n";
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/sha384.phpt?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/hash/tests/sha384.phpt
diff -u php-src/ext/hash/tests/sha384.phpt:1.3
php-src/ext/hash/tests/sha384.phpt:1.4
--- php-src/ext/hash/tests/sha384.phpt:1.3 Wed Nov 23 00:30:08 2005
+++ php-src/ext/hash/tests/sha384.phpt Wed Sep 20 00:32:54 2006
@@ -1,7 +1,7 @@
--TEST--
sha384 algorithm
--SKIPIF--
-<?php if(!extension_loaded("hash")) print "skip"; ?>
+<?php if(!extension_loaded("hash") || ini_get('unicode.semantics')) print
"skip"; ?>
--FILE--
<?php
echo hash('sha384', '') . "\n";
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/sha512.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/hash/tests/sha512.phpt
diff -u php-src/ext/hash/tests/sha512.phpt:1.2
php-src/ext/hash/tests/sha512.phpt:1.3
--- php-src/ext/hash/tests/sha512.phpt:1.2 Wed Nov 23 00:30:08 2005
+++ php-src/ext/hash/tests/sha512.phpt Wed Sep 20 00:32:54 2006
@@ -1,7 +1,7 @@
--TEST--
sha512 algorithm
--SKIPIF--
-<?php if(!extension_loaded("hash")) print "skip"; ?>
+<?php if(!extension_loaded("hash") || ini_get('unicode.semantics')) print
"skip"; ?>
--FILE--
<?php
echo hash('sha512', '') . "\n";
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/snefru.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/hash/tests/snefru.phpt
diff -u php-src/ext/hash/tests/snefru.phpt:1.1
php-src/ext/hash/tests/snefru.phpt:1.2
--- php-src/ext/hash/tests/snefru.phpt:1.1 Fri Nov 25 18:24:34 2005
+++ php-src/ext/hash/tests/snefru.phpt Wed Sep 20 00:32:54 2006
@@ -1,7 +1,7 @@
--TEST--
snefru
--SKIPIF--
-<?php extension_loaded('hash') or die('skip'); ?>
+<?php if (!extension_loaded('hash') || ini_get('unicode.semantics'))
die('skip'); ?>
--FILE--
<?php
echo hash('snefru', ''), "\n";
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/tiger.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/hash/tests/tiger.phpt
diff -u php-src/ext/hash/tests/tiger.phpt:1.2
php-src/ext/hash/tests/tiger.phpt:1.3
--- php-src/ext/hash/tests/tiger.phpt:1.2 Thu Nov 24 14:28:34 2005
+++ php-src/ext/hash/tests/tiger.phpt Wed Sep 20 00:32:54 2006
@@ -1,7 +1,7 @@
--TEST--
tiger
--SKIPIF--
-<?php extension_loaded('hash') or die('skip'); ?>
+<?php if (!extension_loaded('hash') || ini_get('unicode.semantics'))
die('skip'); ?>
--FILE--
<?php
echo hash('tiger192,3', ''),"\n";
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/whirlpool.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/hash/tests/whirlpool.phpt
diff -u php-src/ext/hash/tests/whirlpool.phpt:1.1
php-src/ext/hash/tests/whirlpool.phpt:1.2
--- php-src/ext/hash/tests/whirlpool.phpt:1.1 Wed Nov 23 21:15:41 2005
+++ php-src/ext/hash/tests/whirlpool.phpt Wed Sep 20 00:32:54 2006
@@ -1,7 +1,7 @@
--TEST--
whirlpool
--SKIPIF--
-<?php extension_loaded('hash') or die('skip'); ?>
+<?php if (!extension_loaded('hash') || ini_get('unicode.semantics'))
die('skip'); ?>
--FILE--
<?php
echo hash('whirlpool', ''), "\n";
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php