From 3e52aaf16d95a48fff5abfd04a4fb8a3d3aa33a9 Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Sat, 17 May 2008 23:29:14 +0000 Subject: [PATCH] MFH: Tests from Munich PHP Testfest 2008 --- ext/mcrypt/tests/mcrypt_cbc.phpt | 23 +++++++++++++++ ext/mcrypt/tests/mcrypt_cbf.phpt | 23 +++++++++++++++ ext/mcrypt/tests/mcrypt_create_iv.phpt | 17 +++++++++++ ext/mcrypt/tests/mcrypt_create_iv.phpt~ | 21 ++++++++++++++ ext/mcrypt/tests/mcrypt_decrypt.phpt | 28 +++++++++++++++++++ ext/mcrypt/tests/mcrypt_ecb.phpt | 21 ++++++++++++++ .../tests/mcrypt_enc_get_algorithms_name.phpt | 22 +++++++++++++++ .../tests/mcrypt_enc_get_block_size.phpt | 16 +++++++++++ ext/mcrypt/tests/mcrypt_enc_get_iv_size.phpt | 16 +++++++++++ ext/mcrypt/tests/mcrypt_enc_get_key_size.phpt | 16 +++++++++++ .../tests/mcrypt_enc_get_mode_name.phpt | 25 +++++++++++++++++ .../mcrypt_enc_get_supported_key_sizes.phpt | 18 ++++++++++++ .../tests/mcrypt_enc_is_block_algorithm.phpt | 16 +++++++++++ .../mcrypt_enc_is_block_algorithm_mode.phpt | 16 +++++++++++ .../tests/mcrypt_enc_is_block_mode.phpt | 19 +++++++++++++ ext/mcrypt/tests/mcrypt_enc_self_test.phpt | 10 +++++++ ext/mcrypt/tests/mcrypt_get_block_size.phpt | 13 +++++++++ ext/mcrypt/tests/mcrypt_get_cipher_name.phpt | 15 ++++++++++ ext/mcrypt/tests/mcrypt_get_iv_size.phpt | 17 +++++++++++ ext/mcrypt/tests/mcrypt_get_key_size.phpt | 13 +++++++++ ext/mcrypt/tests/mcrypt_list_algorithms.phpt | 16 +++++++++++ ext/mcrypt/tests/mcrypt_list_modes.phpt | 26 +++++++++++++++++ .../mcrypt_module_get_algo_block_size.phpt | 19 +++++++++++++ .../mcrypt_module_get_algo_key_size.phpt | 19 +++++++++++++ ...mcrypt_module_get_supported_key_sizes.phpt | 19 +++++++++++++ .../mcrypt_module_is_block_algorithm.phpt | 15 ++++++++++ ...mcrypt_module_is_block_algorithm_mode.phpt | 15 ++++++++++ .../tests/mcrypt_module_is_block_mode.phpt | 17 +++++++++++ ext/mcrypt/tests/mcrypt_module_open.phpt | 14 ++++++++++ ext/mcrypt/tests/mcrypt_module_self_test.phpt | 13 +++++++++ ext/mcrypt/tests/mcrypt_ofb.phpt | 21 ++++++++++++++ 31 files changed, 559 insertions(+) create mode 100644 ext/mcrypt/tests/mcrypt_cbc.phpt create mode 100644 ext/mcrypt/tests/mcrypt_cbf.phpt create mode 100644 ext/mcrypt/tests/mcrypt_create_iv.phpt create mode 100644 ext/mcrypt/tests/mcrypt_create_iv.phpt~ create mode 100644 ext/mcrypt/tests/mcrypt_decrypt.phpt create mode 100644 ext/mcrypt/tests/mcrypt_ecb.phpt create mode 100644 ext/mcrypt/tests/mcrypt_enc_get_algorithms_name.phpt create mode 100644 ext/mcrypt/tests/mcrypt_enc_get_block_size.phpt create mode 100644 ext/mcrypt/tests/mcrypt_enc_get_iv_size.phpt create mode 100644 ext/mcrypt/tests/mcrypt_enc_get_key_size.phpt create mode 100644 ext/mcrypt/tests/mcrypt_enc_get_mode_name.phpt create mode 100644 ext/mcrypt/tests/mcrypt_enc_get_supported_key_sizes.phpt create mode 100644 ext/mcrypt/tests/mcrypt_enc_is_block_algorithm.phpt create mode 100644 ext/mcrypt/tests/mcrypt_enc_is_block_algorithm_mode.phpt create mode 100644 ext/mcrypt/tests/mcrypt_enc_is_block_mode.phpt create mode 100644 ext/mcrypt/tests/mcrypt_enc_self_test.phpt create mode 100644 ext/mcrypt/tests/mcrypt_get_block_size.phpt create mode 100644 ext/mcrypt/tests/mcrypt_get_cipher_name.phpt create mode 100644 ext/mcrypt/tests/mcrypt_get_iv_size.phpt create mode 100644 ext/mcrypt/tests/mcrypt_get_key_size.phpt create mode 100644 ext/mcrypt/tests/mcrypt_list_algorithms.phpt create mode 100644 ext/mcrypt/tests/mcrypt_list_modes.phpt create mode 100644 ext/mcrypt/tests/mcrypt_module_get_algo_block_size.phpt create mode 100644 ext/mcrypt/tests/mcrypt_module_get_algo_key_size.phpt create mode 100644 ext/mcrypt/tests/mcrypt_module_get_supported_key_sizes.phpt create mode 100644 ext/mcrypt/tests/mcrypt_module_is_block_algorithm.phpt create mode 100644 ext/mcrypt/tests/mcrypt_module_is_block_algorithm_mode.phpt create mode 100644 ext/mcrypt/tests/mcrypt_module_is_block_mode.phpt create mode 100644 ext/mcrypt/tests/mcrypt_module_open.phpt create mode 100644 ext/mcrypt/tests/mcrypt_module_self_test.phpt create mode 100644 ext/mcrypt/tests/mcrypt_ofb.phpt diff --git a/ext/mcrypt/tests/mcrypt_cbc.phpt b/ext/mcrypt/tests/mcrypt_cbc.phpt new file mode 100644 index 0000000000..f9160db011 --- /dev/null +++ b/ext/mcrypt/tests/mcrypt_cbc.phpt @@ -0,0 +1,23 @@ +--TEST-- +mcrypt_cbc +--SKIPIF-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + + int(16) + [1]=> + int(24) + [2]=> + int(32) +} \ No newline at end of file diff --git a/ext/mcrypt/tests/mcrypt_enc_is_block_algorithm.phpt b/ext/mcrypt/tests/mcrypt_enc_is_block_algorithm.phpt new file mode 100644 index 0000000000..21a0ed2b88 --- /dev/null +++ b/ext/mcrypt/tests/mcrypt_enc_is_block_algorithm.phpt @@ -0,0 +1,16 @@ +--TEST-- +mcrypt_enc_is_block_algorithm +--SKIPIF-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + + string(3) "cbc" + [1]=> + string(3) "cfb" + [2]=> + string(3) "ctr" + [3]=> + string(3) "ecb" + [4]=> + string(4) "ncfb" + [5]=> + string(4) "nofb" + [6]=> + string(3) "ofb" + [7]=> + string(6) "stream" +} \ No newline at end of file diff --git a/ext/mcrypt/tests/mcrypt_module_get_algo_block_size.phpt b/ext/mcrypt/tests/mcrypt_module_get_algo_block_size.phpt new file mode 100644 index 0000000000..c89a44ad8a --- /dev/null +++ b/ext/mcrypt/tests/mcrypt_module_get_algo_block_size.phpt @@ -0,0 +1,19 @@ +--TEST-- +mcrypt_module_get_algo_block_size +--SKIPIF-- + +--FILE-- + +--FILE-- + +--FILE-- + + int(16) + [1]=> + int(24) + [2]=> + int(32) +} +array(0) { +} \ No newline at end of file diff --git a/ext/mcrypt/tests/mcrypt_module_is_block_algorithm.phpt b/ext/mcrypt/tests/mcrypt_module_is_block_algorithm.phpt new file mode 100644 index 0000000000..2cfc87ddf5 --- /dev/null +++ b/ext/mcrypt/tests/mcrypt_module_is_block_algorithm.phpt @@ -0,0 +1,15 @@ +--TEST-- +mcrypt_module_is_block_algorithm +--SKIPIF-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- +