Loading ...
Sorry, an error occurred while loading the content.
 

Re: Encrypt data in a cookie

Expand Messages
  • webmaster_bmw
    Er, as far as I can tell, cookie data gets encrypted anyway. Greg ... a cookie. I store a user name in the cookie and I don t want people to alter it manually
    Message 1 of 3 , Apr 2, 2002
      Er, as far as I can tell, cookie data gets encrypted anyway.

      Greg

      --- In perlforbeginners@y..., "Paul_Lav" <paul_lav@y...> wrote:
      > How do you encrypt data or make it so the value can't be changed in
      a cookie. I store a user name in the cookie and I don't want people
      to alter it manually
      >
      > Thanks.
      > Paul
      >
      >
      > [Non-text portions of this message have been removed]
    • vimdango
      Hi Paul and Greg, Cookies are not encrypted, just lightly encoded; big difference. I wouldn t try to reinvent the wheel with this. If the cookie is being used
      Message 2 of 3 , Apr 2, 2002
        Hi Paul and Greg,

        Cookies are not encrypted, just lightly encoded; big difference.
        I wouldn't try to reinvent the wheel with this. If the cookie is
        being used so that the person does not have to log in across different
        sessions then it would be involved, probably a little beyond what you
        want to do, to use one-way encryption. So you use

        Crypt::CBC
        with a cipher like
        Crypt::Blowfish

        Basically you install both if they aren't already, and handle
        everthing through Crypt::CBC. Probably the only reason you'll have to
        use Crypt::Blowfish directly is to generate your key.

        That should do the trick for you.

        Hope that helps.
        Regards,
        Glen

        --
        cybersalad.net: a substance almost,
        but not quite utterly unlike salad.




        --- In perlforbeginners@y..., webmaster_bmw <no_reply@y...> wrote:
        > Er, as far as I can tell, cookie data gets encrypted anyway.
        >
        > Greg
        >
        > --- In perlforbeginners@y..., "Paul_Lav" <paul_lav@y...> wrote:
        > > How do you encrypt data or make it so the value can't be changed
        in
        > a cookie. I store a user name in the cookie and I don't want people
        > to alter it manually
        > >
        > > Thanks.
        > > Paul
        > >
        > >
        > > [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.