diff options
| author | Stefan Esser | 2010-02-21 11:44:54 +0100 |
|---|---|---|
| committer | Stefan Esser | 2010-02-21 11:44:54 +0100 |
| commit | 36dbfacbe64697d959f524e537b15b73c090d898 (patch) | |
| tree | f1c7ce1409b0e7765fc72d550546967fcf0f9717 /tests/funcs | |
Inital commit
Diffstat (limited to 'tests/funcs')
| -rw-r--r-- | tests/funcs/crypt_blowfish.phpt | 13 | ||||
| -rw-r--r-- | tests/funcs/crypt_ext_des.phpt | 12 | ||||
| -rw-r--r-- | tests/funcs/crypt_md5.phpt | 11 | ||||
| -rw-r--r-- | tests/funcs/crypt_std_des.phpt | 11 | ||||
| -rw-r--r-- | tests/funcs/sha256.phpt | 40 |
5 files changed, 87 insertions, 0 deletions
diff --git a/tests/funcs/crypt_blowfish.phpt b/tests/funcs/crypt_blowfish.phpt new file mode 100644 index 0000000..f48e411 --- /dev/null +++ b/tests/funcs/crypt_blowfish.phpt | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | --TEST-- | ||
| 2 | CRYPT_BLOWFISH support | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php include "../skipif.inc"; ?> | ||
| 5 | --FILE-- | ||
| 6 | <?php | ||
| 7 | var_dump(CRYPT_BLOWFISH); | ||
| 8 | echo crypt('rasmuslerdorf', '$2a$07$rasmuslerd...........$') . "\n"; | ||
| 9 | ?> | ||
| 10 | --EXPECT-- | ||
| 11 | int(1) | ||
| 12 | $2a$07$rasmuslerd............nIdrcHdxcUxWomQX9j6kvERCFjTg7Ra | ||
| 13 | |||
diff --git a/tests/funcs/crypt_ext_des.phpt b/tests/funcs/crypt_ext_des.phpt new file mode 100644 index 0000000..4e2ba73 --- /dev/null +++ b/tests/funcs/crypt_ext_des.phpt | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | --TEST-- | ||
| 2 | CRYPT_EXT_DES support | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (CRYPT_EXT_DES == 0) print 'skip'; ?> | ||
| 5 | --FILE-- | ||
| 6 | <?php | ||
| 7 | echo crypt('rasmuslerdorf', '_J9..rasm') . "\n" | ||
| 8 | ?> | ||
| 9 | --EXPECT-- | ||
| 10 | _J9..rasmBYk8r9AiWNc | ||
| 11 | |||
| 12 | |||
diff --git a/tests/funcs/crypt_md5.phpt b/tests/funcs/crypt_md5.phpt new file mode 100644 index 0000000..fd39d20 --- /dev/null +++ b/tests/funcs/crypt_md5.phpt | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | --TEST-- | ||
| 2 | CRYPT_MD5 support | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (CRYPT_MD5 == 0) print 'skip'; ?> | ||
| 5 | --FILE-- | ||
| 6 | <?php | ||
| 7 | echo crypt('rasmuslerdorf', '$1$rasmusle$') . "\n" | ||
| 8 | ?> | ||
| 9 | --EXPECT-- | ||
| 10 | $1$rasmusle$rISCgZzpwk3UhDidwXvin0 | ||
| 11 | |||
diff --git a/tests/funcs/crypt_std_des.phpt b/tests/funcs/crypt_std_des.phpt new file mode 100644 index 0000000..926ec44 --- /dev/null +++ b/tests/funcs/crypt_std_des.phpt | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | --TEST-- | ||
| 2 | CRYPT_STD_DES support | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (CRYPT_STD_DES == 0) print 'skip'; ?> | ||
| 5 | --FILE-- | ||
| 6 | <?php | ||
| 7 | echo crypt('rasmuslerdorf', 'rl') . "\n" | ||
| 8 | ?> | ||
| 9 | --EXPECT-- | ||
| 10 | rl.3StKT.4T8M | ||
| 11 | |||
diff --git a/tests/funcs/sha256.phpt b/tests/funcs/sha256.phpt new file mode 100644 index 0000000..cb407b1 --- /dev/null +++ b/tests/funcs/sha256.phpt | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | --TEST-- | ||
| 2 | SHA256 support | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php include "../skipif.inc"; ?> | ||
| 5 | --FILE-- | ||
| 6 | <?php | ||
| 7 | echo sha256("") , "\n"; | ||
| 8 | echo sha256("a"), "\n"; | ||
| 9 | echo sha256(pack("H*", "bd")), "\n"; | ||
| 10 | echo sha256(pack("H*", "5fd4")), "\n"; | ||
| 11 | echo sha256(pack("H*", "b0bd69")), "\n"; | ||
| 12 | echo sha256(pack("H*", "c98c8e55")), "\n"; | ||
| 13 | echo sha256(pack("H*", "81a723d966")), "\n"; | ||
| 14 | echo sha256(pack("H*", "c97a2db566e5")), "\n"; | ||
| 15 | echo sha256(pack("H*", "f53210aa6ed72e")), "\n"; | ||
| 16 | echo sha256(pack("H*", "0df1cd526b5a4edd")), "\n"; | ||
| 17 | echo sha256(pack("H*", "b80233e2c53ab32cc3")), "\n"; | ||
| 18 | echo sha256(pack("H*", "5d54ed5b52d879aeb5dd")), "\n"; | ||
| 19 | echo sha256(pack("H*", "df866ecb67ab00515f6247")), "\n"; | ||
| 20 | echo sha256(pack("H*", "0757de9485a2eaea51126077")), "\n"; | ||
| 21 | echo sha256(pack("H*", "7c66f5d443c11cfb39dd0aa715")), "\n"; | ||
| 22 | echo sha256(pack("H*", "329624fed35639fe54957b7d47a9")), "\n"; | ||
| 23 | ?> | ||
| 24 | --EXPECT-- | ||
| 25 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 | ||
| 26 | ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb | ||
| 27 | 68325720aabd7c82f30f554b313d0570c95accbb7dc4b5aae11204c08ffe732b | ||
| 28 | 7c4fbf484498d21b487b9d61de8914b2eadaf2698712936d47c3ada2558f6788 | ||
| 29 | 4096804221093ddccfbf46831490ea63e9e99414858f8d75ff7f642c7ca61803 | ||
| 30 | 7abc22c0ae5af26ce93dbb94433a0e0b2e119d014f8e7f65bd56c61ccccd9504 | ||
| 31 | 7516fb8bb11350df2bf386bc3c33bd0f52cb4c67c6e4745e0488e62c2aea2605 | ||
| 32 | 0eb0281b27a4604709b0513b43ad29fdcff9a7a958554abc689d7fe35af703e4 | ||
| 33 | dee684641421d1ba5a65c71f986a117cbb3d619a052a0b3409306c629575c00f | ||
| 34 | 47f527210d6e8f940b5082fec01b7305908fa2b49ea3ae597c19a3986097153c | ||
| 35 | c60d239cc6da3ad31f4de0c2d58a73ccf3f9279e504fa60ad55a31dcf686f3ca | ||
| 36 | e0164d90dbfcf173bb88044fac596ccd03b8d247c79907aaa5701767fad7b576 | ||
| 37 | dc990ef3109a7bcf626199db9ab7801213ceb0ad2ee398963b5061e39c05c7b5 | ||
| 38 | c1c9a4daadcc8678835872c7f1f8824376ac7b412e1fc2285069b41afd51397e | ||
| 39 | 6840619417b4d8ecaa7902f8eaf2e82be2638dec97cb7e8fcc377007cc176718 | ||
| 40 | 0f5308ff22b828e18bd65afbc427e3c1a678962832519df5f2f803f68f55e10b | ||
