Im dropping a cookie with userid. Can I encrypt it somehow?

I would like to encypt my cookie. Does anyone have any idea on how to do it.Thanks in advance
[121 byte] By [adamrau] at [2007-9-26 2:19:25]
# 1
Does anyone have any info on this at all.This is very urgent!!Thanks again
adamrau at 2007-6-29 9:21:50 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

You can do pretty much what you want with it. It is easy enough to create your own simple encryption algorithm for a number like a userid. An alternative is to use a session variable that is matched to the user id on the server side and times out after a short while. That way even if someone does read the cookie from your client machine it is useless to them.

Breakfast at 2007-6-29 9:21:50 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
May be u shld ve a look at: http://java.sun.com/products/jce/index.html
sunilkg at 2007-6-29 9:21:50 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
Thank you very much!!
adamrau at 2007-6-29 9:21:50 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...