![]() |
encrypt->decode does NOTHING. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: encrypt->decode does NOTHING. (/showthread.php?tid=10136) |
encrypt->decode does NOTHING. - El Forum - 07-20-2008 [eluser]loathsome[/eluser] Hello. I try to decode a string using the encrypt library, but nothing happens. I pasted from the manual as well Quote:$encrypted_string = 'APANtByIGI1BpVXZTJgcsAG8GZl8pdwwa84'; And I get nothing. I have set an encryption key in the config file. What the heck is this?? Encode works just fine. Thanks. encrypt->decode does NOTHING. - El Forum - 07-20-2008 [eluser]Derek Allard[/eluser] Be sure you are decode I a string that you'd previously encoded. What happens if you run this? Code: function test() encrypt->decode does NOTHING. - El Forum - 07-20-2008 [eluser]loathsome[/eluser] Hi Derek. Your example does work, luckily, but the one copy/pasted from the user guide does not - which explains my confusion. I also tried it out with my own encoded strings, but after running your code everything seems to work now. (Maybe you snuck some evil robots in there? :O) Anyway, you better fix up the documentation then. When I encode "My secret message", I get Quote:4QLohIc7WHMrYV5fDpOCLwahLv2uDLpTbQ9YqbyFOKeje0cNhBf8pXcixIxtZensrjW+3Py7o6liqD6KNc+jgIlryfQtk3IWqiLeMX+jNotJbLQRCDJWDdcfxfRkHLkM Maybe it's left from an older version or something ![]() encrypt->decode does NOTHING. - El Forum - 07-20-2008 [eluser]Pascal Kriete[/eluser] loathsome, the message depends on your encryption key. That way someone who doesn't know your key cannot decrypt it - which is the goal. The user guide doesn't say what encryption key it used, so you cannot decrypt that example. Make sense? encrypt->decode does NOTHING. - El Forum - 07-20-2008 [eluser]loathsome[/eluser] Ah, of course!! I have no idea how I didn't think about that, and it makes perfect sense. *bashes head against wall*. Stupid me ![]() |