[PEPr] Comment on Encryption::HCE_SHA
| From: | Philippe Jausions | Date: | Tue, 01 Jan 2008 19:18:49 +0000 |
| Subject: | [PEPr] Comment on Encryption::HCE_SHA | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-48840@lists.php.net to get a copy of this message | ||
Philippe Jausions (http://pear.php.net/user/jausions) has commented on the proposal for
Encryption::HCE_SHA.
Comment:
1. Please provide direct access to the source, besides the packaged
version.
2. Don't use TAB but spaces to indent code
3. Class should at least be named "Crypt_HCE_SHA"
4. Is sha1 the only hash function supported? The thinking behind the
question, is whether SHA should even be in the class name.
5. Put spaces around = signs, after commas, and before { in for loops
6. What is the purpose of the empty __destruct() method?
7. Public methods should follow camelCase i.e. blockEncrypt() instead of
hce_block_encrypt()
8. Clean up formatting of doc blocks to match PEAR's coding standard
9. Missing doc block for private members $secret_key and $random_key)
10. I don't have much suggestions for better method names, but
hce_block_encode_mime() and hce_block_decode_mime() but "mime" doesn't
necessarily implies "base64", and "encode" vs "encrypt" is not very
consistent.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=464
--
Sent by PEPr, the automatic proposal system at http://pear.php.net