com.jcorporate.expresso.core.misc
Class CookieUtil
java.lang.Object
com.jcorporate.expresso.core.misc.CookieUtil
- public class CookieUtil
- extends Object
A utility class for encoding and decoding cookies before sending them
to the browser
- Since:
- Expresso 3.0
- Author:
- Michael Rimov
|
Method Summary |
static String |
cookieDecode(String data)
cookieDecode - given a string, encrypt it to block plaintext snooping
traffic to catch user ids and passwords. |
static String |
cookieEncode(String data)
cookieEncode - given a string, encrypt it to block plaintext snooping
traffic to catch user ids and passwords. |
static void |
test()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CookieUtil
public CookieUtil()
cookieDecode
public static String cookieDecode(String data)
throws Exception
- cookieDecode - given a string, encrypt it to block plaintext snooping
traffic to catch user ids and passwords.
- Parameters:
data - The data to decrypt.
- Returns:
- String the decoded string or "" if it doesn't decode.
- Throws:
Exception - if there are problems with loading the crypto routines
cookieEncode
public static String cookieEncode(String data)
throws ChainedException
- cookieEncode - given a string, encrypt it to block plaintext snooping
traffic to catch user ids and passwords. Also Base64 Encodes the
ciphertext so that the result is standard Ascii string handling.
- Parameters:
data - The data to encrypt.
- Returns:
- String the encode string or "" if it doesn't encode.
- Throws:
ChainedException - if there are problems with loading the crypto routines
test
public static void test()
Please see www.jcorporate.com for information about new Expresso releases.