Help with OpenSSL Function

This is a discussion on Help with OpenSSL Function within the PHP General forums, part of the PHP Programming Forums category; Hi guys, I am trying to use Apache, PHP 4.3, and PHP's Openssl functions to encrypt a variable. ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-12-2006
Shanon Swafford
 
Posts: n/a
Default Help with OpenSSL Function


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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:43 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0