You are here

private static function ServicesClientOAuthRequest::generate_nonce in Services Client 7

Same name and namespace in other branches
  1. 7.2 services_client_connection/modules/services_client_oauth/plugins/ServicesClientOAuthRequest.inc \ServicesClientOAuthRequest::generate_nonce()

util function: current nonce

1 call to ServicesClientOAuthRequest::generate_nonce()
ServicesClientOAuthRequest::from_consumer_and_token in services_client_connection/modules/services_client_oauth/plugins/ServicesClientOAuthRequest.inc
pretty much a helper function to set up the request

File

services_client_connection/modules/services_client_oauth/plugins/ServicesClientOAuthRequest.inc, line 31

Class

ServicesClientOAuthRequest
@file

Code

private static function generate_nonce() {
  $mt = microtime();
  $rand = mt_rand();
  return md5($mt . $rand);

  // md5s look nicer than numbers
}