URI-Safe Encrypt Library Extension |
[eluser]TheFuzzy0ne[/eluser]
I extended the CI_Encrypt class, as I wanted to have the ability to send an encrypted string over the URI, without triggering the infamous "The URI you submitted has disallowed characters." message. I use it for my "Forgot Password" module on my Web site. I encrypt the users Email address, and the last 16 characters of their MD5 hashed password, and this is then decoded and used to validate the user. I hope someone might find it useful. Code: <?php
[eluser]Edmundas KondraĊĦovas[/eluser]
Thank you for sharing this with us. I already know where I could implement it in one of my projects.
[eluser]pmoroom[/eluser]
Wonderful!!! this is exactly what I was looking for. It works perfectly.
[eluser]jeffpeck[/eluser]
Excellent, a nice solution to a common issue. I am just about to use it myself.
[eluser]fserrano[/eluser]
It might be better to encode and decode to base64 before replacing the characters. I was having some issues with this library until I combined it with TheFuzzyOne's similar code in the helper found here: http://ellislab.com/forums/viewthread/107741/ Here's what I'm using: Code: <?php Let me know what you think.
[eluser]Kelvin86[/eluser]
Hi, I just implemented the My_Encrypt helper class in my website. There is just one problem. Codeigniter gives me an error about: Code: Class 'CI_Encrypt' not found..... The class My_Encrypt is being autoloaded (config.php) Am I the only one with this problem? How Can I fix this?
[eluser]jeffpeck[/eluser]
You need to specify your own subclass prefix. As stated in the manual (bottom of here: http://ellislab.com/codeigniter/user-gui...aries.html): To set your own sub-class prefix, open your application/config/config.php file and look for this item: Code: $config['subclass_prefix'] = 'MY_';
[eluser]jeffpeck[/eluser]
Actually, Kelvin86, it sounds like you actually replaced the CI Encrypt class. Make sure that you put it into the /System/Application/Libraries/ folder and not the /System/Libraries folder.
[eluser]Kelvin86[/eluser]
Thanks. I putted in the Application/helper/ folder first because on the end of MY_Encrypt file it said so. But oke now the problem is fixed. But there is another problem with the decoded part. I got in my controller: Code: function readInbox($from_id, $email_id) Why is this happening????? :S *Edit: The same goes with $email_id |
Welcome Guest, Not a member yet? Register Sign In |