com php-src: test to function hash_update_stream(); : ext/hash/tests/hash_update_stream.phpt

From: Date: Sun, 13 Mar 2016 15:46:48 +0000
Subject: com php-src: test to function hash_update_stream(); : ext/hash/tests/hash_update_stream.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-95154@lists.php.net to get a copy of this message
Commit: 1b683c34ae1b8d7277420ac5398a3a474453ef1e Author: marcosptf <marcosptf@yahoo.com.br> Sun, 13 Mar 2016 12:46:48 -0300 Parents: 01579ae0a6eda82b72a8d44d5cbdeef50a21ca79 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1b683c34ae1b8d7277420ac5398a3a474453ef1e Log: test to function hash_update_stream(); was added a new function to module hash Changed paths: A ext/hash/tests/hash_update_stream.phpt Diff: diff --git a/ext/hash/tests/hash_update_stream.phpt b/ext/hash/tests/hash_update_stream.phpt new file mode 100644 index 0000000..cb2e7f4 --- /dev/null +++ b/ext/hash/tests/hash_update_stream.phpt @@ -0,0 +1,22 @@ +--TEST-- +int hash_update_stream ( resource $context , resource $handle [, int $length = -1 ] ); +--CREDITS-- +marcosptf - <marcosptf@yahoo.com.br> - @phpsp - sao paulo - br +--SKIPIF-- +<?php +if (phpversion() < "5.3.0") { + die('SKIP php version so lower.'); +} +?> +--FILE-- +<?php +$fp = tmpfile(); +fwrite($fp, 'The quick brown fox jumped over the lazy dog..'); +rewind($fp); + +$ctx = hash_init('md5'); +hash_update_stream($ctx, $fp); +echo hash_final($ctx); +?> +--EXPECT-- +5c6ffbdd40d9556b73a21e63c3e0e904

« previous php.cvs (#95154) next »