Re: New Module
| From: | Brad Fisher | Date: | Tue, 05 Mar 2002 18:03:16 +0000 |
| Subject: | Re: New Module | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-80759@lists.php.net to get a copy of this message | ||
J Smith wrote:
> I hesitate to mention this because I don't want to get stuck in a corner
> here, but I've been working on and off on a PHP encryption extension for
> precisely the reasons you mention. I'm using Crypto++, a public ...
This sounds to me like one of the better ways to do it. Just have an extension
that does two-way encryption, and supports several different algorithms. For
those people who whant to define their own algorithms, why not have a way to
register a new crypt/decrypt callback methods either developed in PHP or
loadable module? Something like:
bool crypto_register_algorithm(string name, function &crypt, function
&decrypt)
Then crypt and decrypt could have function headers similar to (perhaps this is
oversimplified):
string crypt(string data, mixed key)
I don't think the module would need to write configuration files, etc. That
could be handled with PHP by the developer, or by another PHP
extension/function which can write such files.
Just babbling,
-Brad