Re: Crypt base class for initial revew
| From: | Michael Bretterklieber | Date: | Sun, 16 Feb 2003 10:46:56 +0000 |
| Subject: | Re: Crypt base class for initial revew | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-13367@lists.php.net to get a copy of this message | ||
Hi Tim,
looks good.
some remarks:
- I think it would be better to move the Crypt_Engine base-class to a seperate File Engine.php
- crypt.php should be under the Crypt-dir to fit in the existing structure of the cvs-repository:
Crypt/Crypt.php
Crypt/Engine.php
Crypt/Ciphers/DES.php
- I would like to move the code for loading the engine from the constuctor to a loadEngine() method.
- Maybe its good to make Crypt an abstract class, and add these classes:
Crypt_Symmetric
Crypt_Asymmetric
because mcrypt supports only symmetric algorithms.
Maybe somone wrapps in the future rasref2 to a php-extension, then its easier to integrate this.
bye,
Tim Thorpe wrote:
Here we go, There are three files in the zip, in a directory structure. In the Ciphers folder there is my DES algorithm implemented as a module for the Crypt base class, as well as a skeleton class for others to use as a framework. Check the usage in the comments of crypt.php and give it a whirl. Comments, questions, etc please. Enjoy! Tim-- ------------------------------- ------------------------------------- Michael Bretterklieber - Michael.Bretterklieber@jawa.at JAWA Management Software GmbH - http://www.jawa.at Liebenauer Hauptstr. 200 -------------- privat --------------- A-8041 GRAZ GSM: ++43-(0)676-93 96 698 Tel: ++43-(0)316-403274-12 E-mail: michael@bretterklieber.com Fax: ++43-(0)316-403274-10 http://www.bretterklieber.com ------------------------------- ------------------------------------- "...the number of UNIX installations has grown to 10, with more expected..." - Dennis Ritchie and Ken Thompson, June 1972