22.02.2013, 12:00
Quote:
I've not actually timed the code, so you could be right, but don't forget that PHP can handle multiple connections at once in separate threads so longer running tasks are not as much of a problem.
|
The CPU usage of one core increased to 100% during this, so this indeed is a resource intensive operation. This might result in less smooth gaming experience, particularly with low-end servers.
Just for comparison: "A PC running a single AMD Radeon HD7970 GPU, for instance, can try on average an astounding 8.2 billion password combinations each second, depending on the algorithm used to scramble them.", http://arstechnica.com/security/2012...under-assault/
In case someone cares, here's the script I used:
pawn Код:
main()
{
new s_time = GetTickCount();
new buffer[129];
WP_Hash(buffer, sizeof(buffer), "password123");
new i = 0;
while(i++ != 65536)
WP_Hash(buffer, sizeof(buffer), buffer);
printf("%d", GetTickCount() - s_time);
return 1;
}