You are here

private static function OAuthRequest::generate_nonce in OAuth 1.0 7.3

Same name and namespace in other branches
  1. 6.3 lib/OAuth.php \OAuthRequest::generate_nonce()
  2. 6 OAuth.php \OAuthRequest::generate_nonce()

util function: current nonce

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

File

lib/OAuth.php, line 501
OAuth 1.0 server and client library.

Class

OAuthRequest

Code

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

  // md5s look nicer than numbers
}