Page 1 of 1
Anyone do a speed test on the sha256 function yet?
Posted: Thu Feb 23, 2006 12:53 pm
by AGISB
Did anyone compare the speed of feyd's sha256 function against php5's hash() yet?
Posted: Fri Feb 24, 2006 2:38 am
by Maugrim_The_Reaper
Not yet. I ran other tests which show SHA256 class's is fairly slow in comparison. But honestly its a PHP implementation - perfect for most open source PHP applications which can't rely on a host having mcrypt enabled. It's in the usage criteria, not the speed that the usefulness of feyd's class is apparent...
http://blog.quantum-star.com/index.php? ... Debug.html
Posted: Fri Feb 24, 2006 3:12 am
by feyd
No need to do a speed test. PHP's will be faster. But mine is fully portable.
Posted: Sat Feb 25, 2006 8:23 pm
by Ambush Commander
Remember: with a Factory class and some indirection, you can swap Feyd's implementation with mcrypt based on it's availability. Ah, the greatness of polymorphism.
Posted: Mon Feb 27, 2006 2:54 am
by Maugrim_The_Reaper
It's probably what should be done in some cases... In many cases it sees limited usage though.
Posted: Mon Feb 27, 2006 11:23 am
by AGISB
with php since the latest php release you don't need mycrypt installed anylonger or does it do so by default?
Posted: Mon Feb 27, 2006 11:29 am
by feyd
5.1.2 has the hash pecl library which has a LOT of hashing functions built in.
Posted: Mon Feb 27, 2006 11:35 am
by Maugrim_The_Reaper
Until its built in completely - no external library - a pure PHP implementation still has a lot of value, esp. for widely distributed open source projects.