in reply to Re^4: encrypt/decrypt string
in thread encrypt/decrypt string

Rather than encrypt/decrypt a string, why not generate a random string that you use as a key to look up the session information? That way there is nothing to decrypt, it's a one time pad in effect.


DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^6: encrypt/decrypt string
by artist (Parson) on Oct 19, 2006 at 18:40 UTC
    I don't have to maintain a table. Also, it's not about the sessions. URL given to user, should be fixed for lifetime, based on login. Also, on decryption, I need to get the 'login' info back.
    --Artist
      Artist, what they are saying is: if you want the login info to be secure, why not just use a random string or number and link it to that login on the server side? If you don't really care about it being secure, why not just send the login unencrypted? Personally, I still can't see what you want to accomplish by encrypting.

      -driver8
        By encrypting the login, people cannot forge logins to hack the system.
        --Artist