rot13 Help :(

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
Jay

Post by Jay » Tue Oct 15, 2002 5:42 am

What the hell is rot13?

DoppyNL

Post by DoppyNL » Tue Oct 15, 2002 5:49 am

rot13 is a very simple method of quickly "encrypting" some text.
to get the original text back simply apply the method again, and you get it back.
it work by swapping the first 13 letters with the last 13 letters of the alphabet.

To answer Jahmin's question:
Make a normal html-form with an input field.
You can then make the resulting page with the posted information.
use the function like this:

Code: Select all

$function_result = rot13($initial_value);

output that to you're page and you're done.

Pretty basic.

Greetz Daan

User avatar
imroue
New php-forum User
New php-forum User
Posts: 62
Joined: Fri Oct 11, 2002 6:53 am

Post by imroue » Tue Oct 15, 2002 9:03 am

DoppyNL wrote:rot13 is a very simple method of quickly "encrypting" some text.
to get the original text back simply apply the method again, and you get it back.
it work by swapping the first 13 letters with the last 13 letters of the alphabet.


by the way.. when you use rot13, can it be read by thephp server?
so is this a way to prevent people from reading your code?

DoppyNL

Post by DoppyNL » Tue Oct 15, 2002 9:15 am

the web-server will only understand normal code, applying rot13 to it will prevent the webserver from parsing the code.

Also, I said "encrypting" (with quotes) because it is not really encrypting. When I see text wich was altered by rot13 I immediatly recognise it.
It is also very easy to get the original contents, so you should absolutely not rely on this method to keep data safe.

Greetz Daan

User avatar
imroue
New php-forum User
New php-forum User
Posts: 62
Joined: Fri Oct 11, 2002 6:53 am

Post by imroue » Tue Oct 15, 2002 9:28 am

DoppyNL wrote:the web-server will only understand normal code, applying rot13 to it will prevent the webserver from parsing the code.

Also, I said "encrypting" (with quotes) because it is not really encrypting. When I see text wich was altered by rot13 I immediatly recognise it.
It is also very easy to get the original contents, so you should absolutely not rely on this method to keep data safe.

Greetz Daan


Thanks for the reply :lol:
Is there a method in php that would protect your data (for example, to keep track of passwords, credit cards..etc..) :?:

Jay

Post by Jay » Tue Oct 15, 2002 1:29 pm

PHP does have ways of encrypting things, but that's best left up to the server hardware to prevent these sorts of attacks. If you also want to encrypt data one way (ie so you can check passwords) the best way is md5, it's a one way industry standard encryption algorithm which is impossible to break!

Post Reply

Who is online

Users browsing this forum: phpnoob and 1 guest