function uptolike_cryptkey in Uptolike share buttons 7
Build crypt key for url.
Return value
null|string The secret key to be added to the url or null if no data.
2 calls to uptolike_cryptkey()
- uptolike_constructor in ./
uptolike.module - Build constructor iframe.
- uptolike_statistic in ./
uptolike.module - Build statistic iframe.
File
- ./
uptolike.module, line 682 - Main file for Uptolike module.
Code
function uptolike_cryptkey() {
$email = variable_get('uptolike_email', NULL);
$key = variable_get('uptolike_key', NULL);
$project_id = uptolike_project_id();
$output = NULL;
if (!empty($email) && !empty($key)) {
// Email address should not be url encoded.
$string = 'mail=' . $email . '&partner=' . UPTOLIKE_PARTNER . '&projectId=' . $project_id;
$output = md5($string . $key);
}
return $output;
}