File: md4.phpt

package info (click to toggle)
php5 5.2.0-8%2Betch1
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 58,836 kB
  • ctags: 45,575
  • sloc: ansic: 535,107; sh: 17,819; php: 11,336; cpp: 4,289; xml: 3,861; yacc: 2,446; lex: 2,174; makefile: 1,150; tcl: 1,128; awk: 693; perl: 71; sql: 22; pascal: 15
file content (24 lines) | stat: -rw-r--r-- 758 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
md4 algorithm
--SKIPIF--
<?php if(!extension_loaded("hash")) print "skip"; ?>
--FILE--
<?php
/* RFC 1320 vectors */
echo hash('md4', '') . "\n";
echo hash('md4', 'a') . "\n";
echo hash('md4', 'abc') . "\n";
echo hash('md4', 'message digest') . "\n";
echo hash('md4', 'abcdefghijklmnopqrstuvwxyz') . "\n";
echo hash('md4', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') . "\n";
echo hash('md4', '12345678901234567890123456789012345678901234567890123456789012345678901234567890') . "\n";
--EXPECT--
31d6cfe0d16ae931b73c59d7e0c089c0
bde52cb31de33e46245e05fbdbd6fb24
a448017aaf21d8525fc10ae87aa6729d
d9130a8164549fe818874806e1c7014b
d79e1c308aa5bbcdeea8ed63df412da9
043f8582f241db351ce627e153e7f0e4
e33b4ddc9c38f2199c3e7b164fcc0536