Re: [PEPr] Comment on Encryption::Crypt_DES
| From: | Terra Frost | Date: | Wed, 09 May 2007 15:37:11 +0000 |
| Subject: | Re: [PEPr] Comment on Encryption::Crypt_DES | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-46681@lists.php.net to get a copy of this message | ||
David Sanders wrote:
David Sanders (http://pear.php.net/user/shangxiao) has commented on the proposal for Encryption::Crypt_DES. Comment: All new packages should be written for only php 5 in mind ;) (So that means var -> public/private, define -> const etc) The only "php 5" requirement I'm aware of is this one:http://pear.php.net/pepr/pepr-proposal-show.php?id=419 That only requires packages be E_STRICT compliant, which this one is. I agree that people should upgrade to PHP5, however, going out of my way to break this for PHP4 users isn't something that at all settles with me. Half the point of this library is that those who are unable change their PHP installation (for example, people using shared hosts) can still use DES. Isn't that how PEAR is supposed to compliment PECL, anyway?
I'm not up to speed with encryption algorithms and libraries and I'm not sure if it would make much difference but it might be an idea to provide the user with the ability to choose whether to always use the internal implementation for consistency. Doing define('CRYPT_DES_MODE', CRYPT_DES_MODE_INTERNAL) before creating the Crypt_DES object should do just that.