public static function secureCookieBasic::encode in Secure Cookie Data 7
Same name and namespace in other branches
- 7.2 secure_cookie_data.class.inc \secureCookieBasic::encode()
Encode the data as a safe string to be in a cookie.
Parameters
object $data: The data object to be encoded.
Return value
string The encoded data serialized.
2 calls to secureCookieBasic::encode()
- secureCookieBasic::create in ./
secure_cookie_data.class.inc - Generates the ciphered hash for the given data, algorithm and secret key.
- secure_cookie_data_put in ./
secure_cookie_data.module - Sets the secure cookie with the given data.
File
- ./
secure_cookie_data.class.inc, line 90 - secure_cookie.class.inc @author António P. P. Almeida <appa@perusio.net> @date Wed Dec 21 03:17:53 2011
Class
- secureCookieBasic
- @file secure_cookie.class.inc @author António P. P. Almeida <appa@perusio.net> @date Wed Dec 21 03:17:53 2011
Code
public static function encode($data = NULL) {
return base64_encode(json_encode($data));
}