function backup_migrate_destination_nodesquirrel::_sign_request in Backup and Migrate 6.2
Same name and namespace in other branches
- 8.3 includes/destinations.nodesquirrel.inc \backup_migrate_destination_nodesquirrel::_sign_request()
- 6.3 includes/destinations.nodesquirrel.inc \backup_migrate_destination_nodesquirrel::_sign_request()
- 7.2 includes/destinations.nodesquirrel.inc \backup_migrate_destination_nodesquirrel::_sign_request()
Genrate a hash with a given secret key, timestamp and random value.
1 call to backup_migrate_destination_nodesquirrel::_sign_request()
- backup_migrate_destination_nodesquirrel::__xmlrpc in includes/
destinations.nodesquirrel.inc - Get the form for the settings for this destination.
File
- includes/
destinations.nodesquirrel.inc, line 494 - Functions to handle the NodeSquirrel backup destination.
Class
- backup_migrate_destination_nodesquirrel
- A destination for sending database backups to the NodeSquirel backup service.
Code
function _sign_request(&$args) {
$nonce = md5(mt_rand());
$time = time();
$hash = $this
->_get_hash($time, $nonce);
if ($hash) {
array_unshift($args, $nonce);
array_unshift($args, $time);
array_unshift($args, $hash);
return TRUE;
}
else {
return FALSE;
}
}