function _openid_nonce

7.x openid.inc _openid_nonce()
6.x openid.inc _openid_nonce()

Return a nonce value - formatted per OpenID spec.

File

drupal-6.x/modules/openid/openid.inc, line 185
OpenID utility functions.

Code

function _openid_nonce() {
  // YYYY-MM-DDThh:mm:ssTZD UTC, plus some optional extra unique chars
  return gmstrftime('%Y-%m-%dT%H:%M:%S%Z') .
    chr(mt_rand(0, 25) + 65) .
    chr(mt_rand(0, 25) + 65) .
    chr(mt_rand(0, 25) + 65) .
    chr(mt_rand(0, 25) + 65);
}