summaryrefslogtreecommitdiff
path: root/ext/mcrypt/tests/mcrypt_enc_is_block_algorithm_mode.phpt
blob: 69c96541752d08b5ea6a29f837d63101f9e8723c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--TEST--
mcrypt_enc_is_block_algorithm_mode
--SKIPIF--
<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
--FILE--
<?php
$td = mcrypt_module_open(MCRYPT_RIJNDAEL_256, '', MCRYPT_MODE_ECB, '');
var_dump(mcrypt_enc_is_block_algorithm_mode($td));
$td = mcrypt_module_open(MCRYPT_RIJNDAEL_256, '', MCRYPT_MODE_CBC, '');
var_dump(mcrypt_enc_is_block_algorithm_mode($td));
$td = mcrypt_module_open(MCRYPT_WAKE, '',  MCRYPT_MODE_STREAM, '');
var_dump(mcrypt_enc_is_block_algorithm_mode($td));
--EXPECT--
bool(true)
bool(true)
bool(false)