List Info

Thread: Re: Comment on Encryption::Crypt_DES




Re: Comment on Encryption::Crypt_DES
user name
2007-05-09 11:19:53
On 5/9/07, Terra Frost <terrafrostphp.net> wrote:
>
> David Sanders wrote:
> > David Sanders (http://pear.php.ne
t/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.

It's more that E_STRICT, really. You're also required to
use
PEAR_Exception for errors. The intent of that RFC was to
have all new
packages be PHP5 packages, with all that this entails.

>
> 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.
>

That doesn't seem like a good way to do configuration to me.
I'd
rather an option be set in e.g. the constructor.

-- 
Justin Patrin

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )