Support Forums

Full Version: Obfuscate Text in HTTP Post
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hallo,
i'd like to submit Text to a Webserver using http webrequest (POST).

How can i obfuscate Text from a multiline textbox in a way, that a PHP script on the server can easily decrypt the information to store the plaintext in a database then?

It doesn't have to be ultra-secure..

any suggestions oder snippets are welcome!
Well PHP as far as I know, has only base64_encode() and base64_decode(), the functions encode text to base64 and decodes it back to original string.
However, base64 text is longer then real text, the data being sent to the server will be larger, if you don't care about that you can use those functions.
Encoding Strings to Base64
VB.NET Base64 Encoder and Decoder
base64_encode()
base64_decode()

On the other hand, you can write your own encoding/decoding function in PHP and C#/VB.NET.
Take a look at this pages and see how other try to do it, learn from it.
http://stackoverflow.com/questions/12890...nd-decrypt
http://strugglingdevelopers.blogspot.com...n-php.html
http://www.osix.net/modules/article/?id=606
http://stackoverflow.com/questions/26351...e64-encode
http://www.php.net/manual/en/refs.crypto.php
I don't suppose there is a way to encrypt it with a few hash sequences that the server can decrypt so he/she has a more secure POST Request is there?
(05-04-2011, 05:00 AM)milopeach Wrote: [ -> ]I don't suppose there is a way to encrypt it with a few hash sequences that the server can decrypt so he/she has a more secure POST Request is there?

You cannot 'decrypt' a hash... the OP could however see if your server has the mcrypt library installed and try to figure out how to use that. But base64 would be perfect if you don't need it to be very secure.
OK, for my purpose BASE64 is enough.

Thx all!