Help with OpenSSL Function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi guys,

I am trying to use Apache, PHP 4.3, and PHP's Openssl functions to encrypt a
variable.

Currently, I can successfully use the following command to encrypt an
existing file and create a new one:

openssl aes-256-cbc -e -in plain_file.xml -out encrypt_file.xml -k
1234123412341234

Is it possible to use the openssl functions in PHP 4.3 without having to use
the file system?

Can sombody help with the syntax to mimick the above to create a variable
with encrypted data from a plain text variable?

Here is a test I'm running:

It takes the following XML file:
http://71.164.193.239:8082/test.xml 

Here is the page:
http://71.164.193.239:8082/test.php

Here is the source:
http://71.164.193.239:8082/test.txt 

Problem:
1.  It spits out different data every time you refresh the test.php page.
Why?  Seems every so often, the encrypted data will be correct.

2.  I would like to get rid of shell_exec and the test.xml file.

3.  If this is not possible, how can I pass the plain variable to the
shell_exec command?

I also found mcrypt functions, but it is not available on my production
server.

Is there a better way to do this?

Thanks and have a good day,
Shanon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux