Package play.mvc
Class CookieDataCodec
java.lang.Object
play.mvc.CookieDataCodec
Provides operations around the encoding and decoding of Cookie data.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic PatternCookie session parser for cookie created by version 1.2.5 or before. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
oldCookieSessionParser
Cookie session parser for cookie created by version 1.2.5 or before.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
-
-
Constructor Details
-
CookieDataCodec
public CookieDataCodec()
-
-
Method Details
-
decode
- Parameters:
map- the map to decode data into.data- the data to decode.- Throws:
UnsupportedEncodingException- if the encoding is not supported
-
encode
- Parameters:
map- the data to encode.- Returns:
- the encoded data.
- Throws:
UnsupportedEncodingException- if the encoding is not supported
-
safeEquals
Constant time for same length String comparison, to prevent timing attacks- Parameters:
a- The string ab- the string b- Returns:
- true is the 2 strings are equals
-