Ecnrypting Global Variables
Moderator: General Moderators
-
davidprogramer
- Forum Commoner
- Posts: 64
- Joined: Mon Nov 28, 2005 6:11 pm
Ecnrypting Global Variables
Ok. Yes. Obviously I am making a lot of threads about this. I am really worried about the security of em. So. I was wondering if its possible to encrypt them. I did read up about mcrypt or something similar to that (not sure if thats the right term). Can someone simply explain or even point me in the right direction to encrypting and decrypting globals? 
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
why do you want to encrypt global variables? why not just NOT declare the variable global and be done with it? anyway:
mcrypt
some documentation on mcrype although I really don't think this makes any sence for your situation
mcrypt
some documentation on mcrype although I really don't think this makes any sence for your situation
-
davidprogramer
- Forum Commoner
- Posts: 64
- Joined: Mon Nov 28, 2005 6:11 pm
Well I need to figure out a way to pass global variables (between pages) and not have them changed AT ALL... Is there a way to transfer information between pages without using global variables? 
edit:
Any time I try using mcrypt functions I get an error, that the function can't be found. Is there a specific include that I need?
edit:
Any time I try using mcrypt functions I get an error, that the function can't be found. Is there a specific include that I need?
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
-
davidprogramer
- Forum Commoner
- Posts: 64
- Joined: Mon Nov 28, 2005 6:11 pm
Because they are only temp until the user gets to the intended page.
Also. I cant use sessions because the invite system sends a PM from one user to another, thus voiding out the use of a session id
Though...you bring up a good point. I suppose I could write..some sort of KEY if you will that looks something like this "32khj432187hfdas" and use that key as a way to get that one row...making it harder to just ....change a number here and there to remove every player in a clan lol.
I don't know -_-
edit:
Ooooh So close...Check this link out!
http://www.datalogik.org/e107_files/downloads/dencrypt
It encrypts/decrypts strings ... ONLY STRINGS. I need somethign that will encrypt and decrypt VARIABLES...So close I wana cry -_-
I have found how to use base64_encode and decode. It works nicely but each of the id's only have about 2 letters and then 2 == signs..
Here is a link to one of the clans:
javascript:popUpClan('modules.php?name=League&file=clan_hq&lid=1&cid=MQ==')
Here is another link:
javascript:popUpClan('modules.php?name=League&file=clan_hq&lid=1&cid=MTI=')
They are TOO similar. Anyway to take the == out and replace it with some more characters?
Also. I cant use sessions because the invite system sends a PM from one user to another, thus voiding out the use of a session id
Though...you bring up a good point. I suppose I could write..some sort of KEY if you will that looks something like this "32khj432187hfdas" and use that key as a way to get that one row...making it harder to just ....change a number here and there to remove every player in a clan lol.
I don't know -_-
edit:
Ooooh So close...Check this link out!
http://www.datalogik.org/e107_files/downloads/dencrypt
It encrypts/decrypts strings ... ONLY STRINGS. I need somethign that will encrypt and decrypt VARIABLES...So close I wana cry -_-
I have found how to use base64_encode and decode. It works nicely but each of the id's only have about 2 letters and then 2 == signs..
Here is a link to one of the clans:
javascript:popUpClan('modules.php?name=League&file=clan_hq&lid=1&cid=MQ==')
Here is another link:
javascript:popUpClan('modules.php?name=League&file=clan_hq&lid=1&cid=MTI=')
They are TOO similar. Anyway to take the == out and replace it with some more characters?
I think your system design structure is flawed.
There should always be an effective way to transfer variables between pages.
I recommend checking out some open source applications from HotScripts.com and other sites and look at how they handle this sort of thing.
That's the beauty of the open source revolution. You can discover and refine your existing programming methods by learning by the examples of others.
There should always be an effective way to transfer variables between pages.
I recommend checking out some open source applications from HotScripts.com and other sites and look at how they handle this sort of thing.
That's the beauty of the open source revolution. You can discover and refine your existing programming methods by learning by the examples of others.