secure_cookie_data.module in Secure Cookie Data 7.2
Same filename and directory in other branches
secure_data_cookie.module @author António P. P. Almeida <appa@perusio.net> @date Thu Nov 21 11:45:23 2013
@brief Implements the secure cookie protocol for storing data.
File
secure_cookie_data.moduleView source
<?php
/**
* @file secure_data_cookie.module
* @author António P. P. Almeida <appa@perusio.net>
* @date Thu Nov 21 11:45:23 2013
*
* @brief Implements the secure cookie protocol for storing data.
*
*
*/
/**
* Sets the secure cookie with the given data.
*
*
* @param string $data
* The JSON data to be stored in the cookie.
* @return boolean
* TRUE if the cookie was modified/set, FALSE if not.
*/
function secure_cookie_data_put($data) {
return secureCookieBasic::set($data);
}
/**
* Obtain the data stored in a secure cookie.
*
* @return object
* The stored data or NULL if the cookie is missing
* or the HMAC doesn't validate.
*/
function secure_cookie_data_get() {
return secureCookieBasic::get();
}
/**
* Deletes the cookie.
*
* @return boolean
* TRUE if the cookie to be deleted exists, FALSE if not.
*/
function secure_cookie_data_delete() {
return secureCookieBasic::delete();
}
Functions
Name![]() |
Description |
---|---|
secure_cookie_data_delete | Deletes the cookie. |
secure_cookie_data_get | Obtain the data stored in a secure cookie. |
secure_cookie_data_put | Sets the secure cookie with the given data. |