DiigIT | IT Community
No Profile Image
Welcome Guest
New User? Register | Login

Need help in mcrypt library

By: rekha singh | 13 Mar 2010 6:08 pm

hiiiii
i want to calculate the time of php for encrypting a file of 10 MB using 3DES method.
I implemented the code successfully.
But unable to calculate the correct time because whenever i execute the page its gives different times in seconds as 10 sec or some time 24 seconds.
Kindly help meeeeee
this is code tested in xamp 1.7.2

<?php
$timestart=time( ); 

$file = 'textfile.txt' ;
$initial_contents = file_get_contents( $file); 

if($initial_ contents) {

$key = "this key";
$encrypted_data = mcrypt_ecb (MCRYPT_3DES, $key, $initial_contents, MCRYPT_ENCRYPT) ;

}

?> 
<table width="1120" align="center" bgcolor="#ffffff" border="0" valign="top" cellspacing= "0" cellpadding= "0">
<tr><td>&nbsp; &nbsp;&nbsp; <?php echo time()-$timestart; ?></td></tr> </table>

Comments

No Comments Posted for this Article.

Leave a comment

Enter the text in the image
img
Can't read?
Type the characters you see in the picture below.


Close Move