Translating PHP mcrypt to exec

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hello, My hosting company does not support the PHP mcrypt functions.
Instead, they recomend using the command line, /usr/local/bin/mcrypt
utility via PHP's exec method.  Sadly, they do not provide any
documentation how to do this.  How would i translate the following

        function encryptString($p_str)
                        $iv_size = mcrypt_get_iv_size(MCRYPT_XTEA,
                        $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);

                        $enc = mcrypt_encrypt(MCRYPT_XTEA,
                        return $enc;
        }   // encryptstring

to run via an exec command, returning the encrypted output to some PHP

I'm using PHP 4 on Linux if that's useful.  Thanks, - Dave

Re: Translating PHP mcrypt to exec wrote:

Quoted text here. Click to load it

You can usually find the man pages for UNIX stuff by via Google by
searching for the name and the word "man".

This may help you:


Site Timeline