function backup_migrate_destination_nodesquirrel::_sign_request

nittany7 destinations.nodesquirrel.inc backup_migrate_destination_nodesquirrel::_sign_request(&$args)

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 modules/contrib/backup_migrate/includes/destinations.nodesquirrel.inc
Get the form for the settings for this destination.

File

modules/contrib/backup_migrate/includes/destinations.nodesquirrel.inc, line 485
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;
  }
}