From: 0 on
x-no-archive: yes

I got an answer if anybody wants it, read and write to a file. Here's the
script to encrypt. Write a similar one for decription.


<?php

$password = "1";

$initialization_vector = 1234567890123456;

$plain_text = file_get_contents ('colors.txt');

$encrypted_text = mcrypt_encrypt(MCRYPT_twofish, $password, $plain_text,
MCRYPT_MODE_cbc, $initialization_vector );


function ob_file_callback($buffer)

{

global $ob_file;

fwrite($ob_file,$buffer);

}

$ob_file = fopen('encrypted_text_file.txt','w');

ob_start('ob_file_callback');

//Anything we output now will go to encrypted_text_file.txt

echo $encrypted_text;

ob_end_flush();

?>













"0" <p> wrote in message news:4c2991c7$0$4980$607ed4bc(a)cv.net...
> x-no-archive: yes
>
> mcrypt_decrypt mcrypt_encrypt
>
> I can't encrypt / decrypt some characters like $...
>
> Parse error: syntax error, unexpected $end in /home/web/eee/encryption.php
> on line 28
>
>
> thanks
>
> <?php
>
> $plain_text = "{}[]:";'<>?,./`1234567890-=~!@#$%^&*()_+";
>
> $password = "this is the password";
>
> $initialization_vector = 11223344;
>
> $encrypted_text = mcrypt_encrypt(MCRYPT_3des, $password, $plain_text,
> MCRYPT_MODE_cfb, $initialization_vector );
>
> echo $encrypted_text ;
>
> ?>
>
>
>
>