Skip to content

Commit 8c20df5

Browse files
committed
CFB updates
1 parent 034ee0e commit 8c20df5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ composer require phpseclib/mcrypt_compat
4040

4141
- cbc
4242
- ncfb
43+
- cfb (master branch only)
4344
- ctr
4445
- ecb
4546
- nofb
4647
- stream
4748

48-
Although `ncfb` and `nofb` are supported `cfb` and `ofb` are not. Further, mcrypt_compat's `ncfb` implementation has some incompatibles with mcrypt's implementation where `mcrypt_generic` and `mdecrypt_generic` are concerned. The unit tests elaborate.
49+
Although `nofb` is supported `ofb` is not. Further, mcrypt_compat's `ncfb` implementation has some incompatibles with mcrypt's implementation where `mcrypt_generic` and `mdecrypt_generic` are concerned. The unit tests elaborate.

lib/mcrypt.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ function phpseclib_mcrypt_list_modes($lib_dir = '')
221221
{
222222
return array(
223223
'cbc',
224-
//'cfb',
224+
'cfb',
225225
'ctr',
226226
'ecb',
227227
'ncfb',
@@ -846,6 +846,7 @@ function phpseclib_mcrypt_module_is_block_algorithm_mode($mode, $lib_dir = '')
846846
case 'cbc':
847847
case 'ctr':
848848
case 'ecb':
849+
case 'cfb':
849850
case 'ncfb':
850851
case 'nofb':
851852
return true;

0 commit comments

Comments
 (0)