Hello every body
I'm in the ...
well I have a big file (around 12M), and I have to encrypt this file, and
to decrypt some time after.
How could I do? Is it possible to encrypt and decrypt a file line by line ?
Please help
david
--
PHP General Mailing List (http://www.php.net/)
To
[snip]
well I have a big file (around 12M), and I have to encrypt this file,
and
to decrypt some time after.
How could I do? Is it possible to encrypt and decrypt a file line by
line ?
[/snip]
Start with the manual at http://us2.php.net/manual/en/ref.mcrypt.php
--
PHP General Mailing List
Hihihihi
Of course I already has the whole object to encrypt and decrypt, my
problem is link to the size of the file.
There is no mcrypt function to load directly a file, so it's need to
preload it in a variable and then encrypt or decrypt it.
But when the file is 12M size it failed.
So
david forums wrote:
Hihihihi
Of course I already has the whole object to encrypt and decrypt, my
problem is link to the size of the file.
There is no mcrypt function to load directly a file, so it's need to
preload it in a variable and then encrypt or decrypt it.
But when the file is
[snip]
There is no mcrypt function to load directly a file, so it's need to
preload it in a variable and then encrypt or decrypt it.
But when the file is 12M size it failed.
[/snip]
What do you mean it failed? What kind of error did you get?
--
PHP General Mailing List (http://www.php.net/)
hi david,
On 7/14/05, david forums [EMAIL PROTECTED] wrote:
So I need to know a way to be able to encrypt large file.
function readfile_chunked ($filename) {
$chunksize = 1*(1024*1024); // it reads 1 mb per chunck. adjust this
if u need.
$buffer = '';
$handle = fopen($filename, 'rb');
Quoting Ahmed Saad [EMAIL PROTECTED]:
// do whatever with the chuck you read.
// you can encrypt it and write all the chunks to the same file
But if you encrypt one chunk at a time and concatenate them later, or if you
encrypt the whole thing, will you still get the same result?
--
hi Skippy
On 7/14/05, Skippy [EMAIL PROTECTED] wrote:
Quoting Ahmed Saad [EMAIL PROTECTED]:
// do whatever with the chuck you read.
// you can encrypt it and write all the chunks to the same file
But if you encrypt one chunk at a time and concatenate them later, or if you
encrypt
Ok tx
And you mean that I can concatenate every chunck in the same file ?
And what about decryption, could I take the same way ?
david
Le Thu, 14 Jul 2005 14:25:48 +0200, Ahmed Saad [EMAIL PROTECTED] a
écrit:
hi david,
On 7/14/05, david forums [EMAIL PROTECTED] wrote:
So I need to
Not at all cause the chunk are beeing free every time it is write in the
file.
so it does not excide the amount you set.
regards
Le Thu, 14 Jul 2005 16:10:17 +0200, Skippy [EMAIL PROTECTED] a écrit:
Quoting Ahmed Saad [EMAIL PROTECTED]:
// do whatever with the chuck you read.
//
On Thu, 14 Jul 2005 16:24:25 +0200 david forums [EMAIL PROTECTED]
wrote:
Not at all cause the chunk are beeing free every time it is write in
the file.
so it does not excide the amount you set.
What I meant was that if the encryption algorithm inserts some magic info
at the beginning of
11 matches
Mail list logo