MCRYPT_TWOFISH192
MCRYPT_TWOFISH256
MCRYPT_RC4
MCRYPT_3DES etc... etc...
what are the differences? do they have different levels of encryption?
Moderator: General Moderators
Code: Select all
<?php
# (C) Copyright 2002 Jon T Stokkeland (Stoker)
# Use at will - BCD / LGPL
$gpg = '/usr/bin/gpg -ear certuser --batch --always-trust --no-secmem-warning --homedir /home/user/.somedir/ 2>&1';
$count = 100;
$start = explode(' ',microtime());
while ($count--)
{
$num = md5(mt_rand()); # md5 hash generation and mt_rand takes some time here too..
# a 32byte string to encrypt
echo "\n\n".'Processing '.$num."\n";
passthru ('/bin/echo '.$num.' | '.$gpg);
}
$end = explode(' ',microtime());
echo "\n\n".'Started at '.date('r',$start[1]).' .'.$start[0]."\n"
.'Ended at '.date('r',$end[1]).' .'.$end[0]."\n"
.'Duration: '. ( ($end[0] + $end[1]) - ($start[0] + $start[1]) ) .' seconds'."\n\n";
?>