You are here

function backup_migrate_destination_nodesquirrel::_sign_request in Backup and Migrate 7.2

Same name and namespace in other branches
  1. 8.3 includes/destinations.nodesquirrel.inc \backup_migrate_destination_nodesquirrel::_sign_request()
  2. 6.3 includes/destinations.nodesquirrel.inc \backup_migrate_destination_nodesquirrel::_sign_request()
  3. 6.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 505
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;
  }
}