php-src/ext/mhash/tests/002.phpt
Ilia Alshanetsky d7d2b6ef50 Switched to a new parameter parsing API, which simplifies the code a great deal.
Made error reporting use php_error_docref()
Fixed a bug in mhash_keygen_s2k() that caused non \0 terminated data to be returned.
Added tests of all mhash functions.
2002-11-20 06:48:39 +00:00

29 lines
436 B
PHP

--TEST--
mhash_get_block_size() & mhash_get_hash_name() test
--SKIPIF--
<?php
include "skip.inc";
?>
--FILE--
<?php
$hc = mhash_count() + 1;
for ($i=0; $i<$hc; $i++) {
if (($hn = mhash_get_hash_name($i))) {
echo $hn . "\t->\t" . mhash_get_block_size($i) . "\n";
}
}
?>
--EXPECT--
CRC32 -> 4
MD5 -> 16
SHA1 -> 20
HAVAL256 -> 32
RIPEMD160 -> 20
TIGER -> 24
GOST -> 32
CRC32B -> 4
HAVAL224 -> 28
HAVAL192 -> 24
HAVAL160 -> 20