public class CookieDataCodec
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.util.regex.Pattern |
oldCookieSessionParser
Cookie session parser for cookie created by version 1.2.5 or before.
|
| Constructor and Description |
|---|
CookieDataCodec() |
| Modifier and Type | Method and Description |
|---|---|
static void |
decode(java.util.Map<java.lang.String,java.lang.String> map,
java.lang.String data) |
static java.lang.String |
encode(java.util.Map<java.lang.String,java.lang.String> map) |
static boolean |
safeEquals(java.lang.String a,
java.lang.String b)
Constant time for same length String comparison, to prevent timing attacks
|
public static java.util.regex.Pattern oldCookieSessionParser
We need it to support old Play 1.2.5 session data encoding so that the cookie data doesn't become invalid when applications are upgraded to a newer version of Play
public static void decode(java.util.Map<java.lang.String,java.lang.String> map,
java.lang.String data)
throws java.io.UnsupportedEncodingException
map - the map to decode data into.data - the data to decode.java.io.UnsupportedEncodingException - if the encoding is not supportedpublic static java.lang.String encode(java.util.Map<java.lang.String,java.lang.String> map)
throws java.io.UnsupportedEncodingException
map - the data to encode.java.io.UnsupportedEncodingException - if the encoding is not supportedpublic static boolean safeEquals(java.lang.String a,
java.lang.String b)
a - The string ab - the string bGuillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly