diff options
author | Ondřej Surý <ondrej@sury.org> | 2012-02-01 21:25:15 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2012-02-01 21:25:15 +0100 |
commit | 96fb2ff5760132a915766f1d9ec7c63001feacd8 (patch) | |
tree | 160904a89a8f3522fa4e47632db101b045e7814a /ext/mcrypt | |
parent | 8f1428d29ef91d74b4d272af171675f2971eb15b (diff) | |
download | php-96fb2ff5760132a915766f1d9ec7c63001feacd8.tar.gz |
Imported Upstream version 5.4.0~rc6upstream/5.4.0_rc6
Diffstat (limited to 'ext/mcrypt')
-rw-r--r-- | ext/mcrypt/mcrypt.c | 2 | ||||
-rw-r--r-- | ext/mcrypt/tests/blowfish.phpt | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c index 2b966a18f..e247a4c6b 100644 --- a/ext/mcrypt/mcrypt.c +++ b/ext/mcrypt/mcrypt.c @@ -1387,7 +1387,7 @@ PHP_FUNCTION(mcrypt_create_iv) } iv = ecalloc(size + 1, 1); - + if (source == RANDOM || source == URANDOM) { #if PHP_WIN32 /* random/urandom equivalent on Windows */ diff --git a/ext/mcrypt/tests/blowfish.phpt b/ext/mcrypt/tests/blowfish.phpt index bd8df9d14..a133091d7 100644 --- a/ext/mcrypt/tests/blowfish.phpt +++ b/ext/mcrypt/tests/blowfish.phpt @@ -4,10 +4,12 @@ Test for blowfish compatibility <?php if (!extension_loaded("mcrypt")) print "skip"; ?> --FILE-- <?php -function hex2bin($data) { - $len = strlen($data); - return pack("H" . $len, $data); -} +if(!function_exists("hex2bin")) { + function hex2bin($data) { + $len = strlen($data); + return pack("H" . $len, $data); + } +} print "key plain crypt guess stat\n"; $null = "\0\0\0\0\0\0\0\0"; |