You are here

private static function OAuthRequest::generate_nonce in jQuery social stream 8

Same name and namespace in other branches
  1. 8.2 src/Twitter/OAuthRequest.php \Drupal\jquery_social_stream\Twitter\OAuthRequest::generate_nonce()

util function: current nonce

1 call to OAuthRequest::generate_nonce()
OAuthRequest::from_consumer_and_token in src/Twitter/OAuthRequest.php
pretty much a helper function to set up the request

File

src/Twitter/OAuthRequest.php, line 265

Class

OAuthRequest

Namespace

Drupal\jquery_social_stream\Twitter

Code

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

  // md5s look nicer than numbers
}