Jump to content

[SOLVED] RHA Encription?


Crew-Portal

Recommended Posts

Hello I am fairly new to making functions in PHP and I was wondering if someone could help me out. I would like to create 2 functions named:

RHA.en

RHA.de

The first one RHA.en will take a string and encrypt it, like:

RHA.en("Hello My Name Is Bob!");

Which will produce "GFH8T95UGIG80W034UG0458"

 

And the second function RHA.de will take an encrypted string and decrypt it, like:

RHA.de("GFH8T95UGIG80W034UG0458");

Which will produce "Hello My Name Is Bob!"

 

Does anyone know how i would go about making an encrypted string that is recognized in a mathamatical algorithim so it can be decrypted one encrypted. I was thinking something like an array of some sort. If someone could write up the code for me or give me a tutorial link for doing such a thing I would be really appreciative!

Link to comment
https://forums.phpfreaks.com/topic/80064-solved-rha-encription/
Share on other sites

Well, since I don't know what this is for I'll just start by saying, encryption is not a reliable way to protect info.

 

1) PHP offers some premade functions

http://ca.php.net/base64%20encode

http://ca.php.net/manual/en/function.base64-decode.php

 

<?php

echo base64_encode('This is an encoded string'); //VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==

?>

<?php

echo base64_decode('VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw=='); //This is an encoded string

?>

 

2) Making your own encryption scheme (a good one) takes a lot of math skills (that I don't have).

Link to comment
https://forums.phpfreaks.com/topic/80064-solved-rha-encription/#findComment-405716
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.