function _openid_nonce

Return a nonce value - formatted per OpenID spec.

2 calls to _openid_nonce()
OpenIDFunctionalTest::testSignatureValidation in drupal/core/modules/openid/lib/Drupal/openid/Tests/OpenIDFunctionalTest.php
Tests that openid.signed is verified.
_openid_test_endpoint_authenticate in drupal/core/modules/openid/tests/openid_test.module
OpenID endpoint; handle "authenticate" requests.

File

drupal/core/modules/openid/openid.inc, line 373
OpenID utility functions.

Code

function _openid_nonce() {

  // YYYY-MM-DDThh:mm:ssZ, plus some optional extra unique characters.
  return gmdate('Y-m-d\\TH:i: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);
}