Re: mcrypt 2.4
| From: | Derick Rethans | Date: | Wed, 19 Jul 2000 22:02:31 +0000 |
| Subject: | Re: mcrypt 2.4 | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-25159@lists.php.net to get a copy of this message | ||
"PHP development @echospace" wrote:
> Can we do something like this?:say, we determine if mcrypt2 is
> installed and have MCRYPT2 defined if this is the case. Now, #ifdef
> MCRYPT2<here goes code for the new API>#else<here goes code for the
> old API>#endif Or is this the BAD THING (tm)?I realize that this is a
> somewhat ugly approach, but besides ugliness I do not see any
> drawbacks compared to creating a brand new module. I assume that
> although API has changed, we can still keep all the functions used in
> mcrypt module before with the same syntax, and add new ones on top of
> that, if necessary. The only thing that changes is the way we use
> mcrypt library from our module. Vlad
Of course you can work with #ifdefs, but it is not handy here. The new
library uses some kind of struct to hold the type of encryption and
such. First you have to open a module (all ciphers are located in
different .so files), then set options and then you can use it. (I
didn't look very well into the code yet, so I hope, I'm not mistaken).
Ik think a brand new module isn't apriopriate though. Let's wait what
Sascha (he's the maintainer of the mcrypt extension) has to say.
--
Derick Rethans
JDI Media Solutions
H.v.Tussenbroekstraat 1
6952 BL Dieren
The Netherlands
e-mail: d.rethans@jdimedia.nl
http://www.jdimedia.nl/