Jump to content

Characters


TapeGun007

Recommended Posts

I want to create a decoding tool.  To do this, I want to create a database with every character in the db, and each character would have up to 255 possibilities for each character.

 

The problem that I'm having is I want to automatically write each character into the database including special characters like single quotes, double quotes, and open parenthesis.

 

I thought about trying something like this:

$characters = Array( A,B,C,......);
 
foreach ($characters as $c){
  < pull the characters >
  < generate random code >
  < write to db >
}

But of course, certain characters like ")" cause a problem in an array.  I thought maybe I could do it by character string or something like that, but I can't seem to find any code examples of that.

 

Any suggestions?

 

Thanks.

Edited by TapeGun007
Link to comment
Share on other sites

Use an encryption class in PHP. You are trying to reinvent the wheel and make it square instead of round (not nearly as good). I respect that you are trying to write this on your own, but encryption algorythms are really complex.

 

Besides, you want to create a database from every character in the database? For one, there will only be encrypted characters in your database, so you dont want to target the characters in the database but those you are receiving from the front end. In the end, you can always run a replace from every know character (which are quite a few) and it would be a breeze to break if anyone really wanted to.

Link to comment
Share on other sites

Whats your purpose? Are you trying to encrypt data? And  brackets wont affect array's since you're representing it as a string. It would be silly if it did affect it as you couldn't do anything, e.g. array("(Hello world)").

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.